Note that there are some explanatory texts on larger screens.

plurals
  1. POLinker error with MathGL in XCode
    text
    copied!<blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="https://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix">What is an undefined reference/unresolved external symbol error and how do I fix it?</a> </p> </blockquote> <p>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 (<em>/usr/local/include</em>) to the XCode C++ project and it is working, since the autocompletion autocompletes the <code>mgl2/mgl.h</code> header file. Yet when I'm trying to build my code, which is only making one <code>mglGraph</code> member, I'm getting many linker errors:</p> <pre> 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 </pre> <p>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?</p> <p>I've tried changing/modifying the environment PATH and DYLD_* paths to include the <em>/usr/local/...</em> paths, but that didn't work. I've tried adding ALL folders in <em>/usr/local/</em> to the include path. I've tried compiling in 32 and 64 bit. I've tried including the <em>/usr/local/lib</em> in the library search path. But nothing worked. So please any help is very much appreciated.</p> <p>Regards Max</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload