Possible Duplicate:
What is an undefined reference/unresolved external symbol error and how do I fix it?
I'm trying to plot some matrices on 3D-graphs using MathGL with XCode. I managed (after a long day of frustration) to cmake, make and install MathGL (even had to install libpng, but that's a differents story). So, I managed to add the MathGL include path (/usr/local/include) to the XCode C++ project and it is working, since the autocompletion autocompletes the mgl2/mgl.h
header file. Yet when I'm trying to build my code, which is only making one mglGraph
member, I'm getting many linker errors:
Undefined symbols for architecture i386: "_mgl_create_graph", referenced from: _main in main.o "_mgl_delete_graph", referenced from: mglGraph::~mglGraph() in main.o "_mgl_set_font_size", referenced from: mglGraph::SetFontSizePT(double, int) in main.o "_mgl_use_graph", referenced from: mglGraph::~mglGraph() in main.o ld: symbol(s) not found for architecture i386
I know there are many posts out there (some even from me) listing problems with including correctly etc. but this one I just can't find any help for. So please anybody, how do I get this to work?
I've tried changing/modifying the environment PATH and DYLD_* paths to include the /usr/local/... paths, but that didn't work. I've tried adding ALL folders in /usr/local/ to the include path. I've tried compiling in 32 and 64 bit. I've tried including the /usr/local/lib in the library search path. But nothing worked. So please any help is very much appreciated.
Regards Max