It seems there is a minor problem with nlopt.h in 2.0.1 under visual studio. I 
upgraded to 2.0.1 today and tried to compile some code which was previously 
compiling with nlopt-1.2 and got a bunch of errors. It appears to be a header 
file problem with nlopt.h so I had a look at it and the problem appears to be 
caused by the NLOPT_STDCALL macro and how it is defined. From Microsoft's 
language reference (http://msdn.microsoft.com/en-us/library/zxk0tw93
(VS.80).aspx):

return-type __stdcall function-name[(argument-list)],

however, currently it is used as (in nlopt.h):

NLOPT_EXTERN void __stdcall nlopt_srand(unsigned long seed),

which expands to:

extern __declspec(dllimport) __stdcall void nlopt_srand(unsigned long seed);

I was able to get my code to compile by moving the __stdcall part after the 
return type. Can I possibly get this problem looked at?

Regards

Dave


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

Reply via email to