unknown error...

I don't see any visible error, but when I try to compile it I have 3 hidden errors....

Undefined symbols for architecture x86_64:
"_stdscr", referenced from:
_main in main.o
"_wgetch", referenced from:
_main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

.....

.............

..................

any ideas how to fix this?
Last edited on
any ideas how to fix this?

Just a WAG, but did you add all the required libraries to your project? You seem to be getting linker errors which usually means that you failed to add a library to your project.


jib

Not sure what library I failed to add...

By the way I'm using Xcode...

Sometimes it hard to find examples to match because most use window compiler like Dev and not Mac compiler like Xcode.... so i'm assuming that if I put this whole thing in window compiler it would probably works.
#include <iostream>
#include <curses.h>
#include <fstream>
#include <pthread.h>
#include <cstring>

this what i have...
Those are your #include files, not the libraries that you're linking with. You need to add the curses library to your project.

Then I have much more to learn... because I haven't learned that in basic C++ yet.. Im taking Intermediate C++ this Fall semester. I was trying to hone my skills during my summer here.
closed account (48T7M4Gy)
http://stackoverflow.com/questions/13234943/not-able-to-compile-with-curses-on-gcc-os-x
Topic archived. No new replies allowed.