Hello everybody,
I am trying to make a Wrapper for the nlopt dll in managed Code to make it callable from C# or other .Net languages.

When I include nlopt.hpp in my wrapper project, I have these strange link errors, even if my project contains an empty class :

1>nloptWrapper.obj : error LNK2028: unresolved token (0A000177) "extern "C" struct nlopt_opt_s * __stdcall nlopt_copy(struct nlopt_opt_s * const)" (?nlopt_copy@@$$J14YGPAUnlopt_opt_s@@QAU1@@Z) referenced in function "public: __thiscall nlopt::opt::opt(class nlopt::opt const &)" (??0opt@nlopt@@$$FQAE@ABV01@@Z) 1>nloptWrapper.obj : error LNK2019: unresolved external symbol "extern "C" struct nlopt_opt_s * __stdcall nlopt_copy(struct nlopt_opt_s * const)" (?nlopt_copy@@$$J14YGPAUnlopt_opt_s@@QAU1@@Z) referenced in function "public: __thiscall nlopt::opt::opt(class nlopt::opt const &)" (??0opt@nlopt@@$$FQAE@ABV01@@Z) 1>C:\Users\riadh\Documents\My Dropbox\HighFrequency\Code\Debug\nloptWrapper.dll : fatal error LNK1120: 2 unresolved externals

I have not any errors if I include nlopt.h instead.

any ideas?
Thanks
Riadh

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

Reply via email to