On Jun 9, 2011, at 6:44 AM, Volker wrote:
i´m trying to install nlopt with python-support. I´m on a Mac os x 10.6 with
numpy install. Therefore i´ve set the --enable-share variable.

./configure --enable-shared --with-cxx

This went fine. However "make" stop with this error message:
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[2]: *** [libnlopt_cxx.la] Error 1

Thanks for your message. You don't quote enough of the make output to actually show the source of the linker error. However, I have access to a MacOS X system and was able to replicate your problem.

The problem seems to be that, on MacOS X, I need to explicitly tell the linker that C++ libraries are used when creating the libnlopt_cxx library (as opposed to only when linking the library, as on most other systems), and automake does not do this by default.

A workaround might be to omit the --with-cxx flag, which is only needed if you want to use the StoGO algorithm (it is *not* needed just to call NLopt from C++ code).

Unfortunately, I tried this and ran into another problem: when it links the Python code, it runs into a similar linker error where MacOS X needs the Makefile to explicitly link in some Python libraries.

I'll look into this and try to fix it for the next release; I have no excuse not to get this working since I have a Mac on my desk (although I primarily log into a GNU/Linux machine for development and numerical work).

Steven
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss

Reply via email to