On May 28, 2012, at 12:20 PM, James Barrett wrote:
> I am unable to compile my code with the nlopt library. My code is based on
> the tutorial example (below). I compile with gcc -lnlopt main.c and get
> several errors:
You need to compile with
gcc main.c -lnlopt
On Unix, the library has to come AFTER the program that uses it. (In general,
if A needs B, then A should come before B on the link line.)
_______________________________________________
NLopt-discuss mailing list
[email protected]
http://ab-initio.mit.edu/cgi-bin/mailman/listinfo/nlopt-discuss