Hi Juergen,

It looks like this is a consequence of 2.0.2 using the stdcall calling convention -- apparently, in that convention, the "@" is appended to the function name to indicate the size of the argument stack.

I had noticed this, but had (apparently incorrectly) thought that the @ didn't belong in the .def file and had stripped it out.

I have posted a new version of the nlopt-2.0.2-dll.zip file, in which the .def file includes the names with the @ part included. Please let me know if this fixes your problem. (The other alternative would be to go back to the old non-stdcall convention, although that reportedly is incompatible with .NET.)

Steven

On Jun 21, 2010, at 8:31 AM, Jürgen Werner wrote:
I have problems linking to the DLL of version 2.0.2 and unfortunately also
only very little experience in using DLLs (or even MS Windows).

The old tutorial example code (from website for 1.2) runs fine in a test project using DLL 1.2 but generates the following error message in a test project that
uses DLL 2.0.2 but is otherwise the same:

error LNK2019: unresolved external symbol __imp__nlopt_minimize_constrai...@96 referenced in function _main libtest2.obj

Trying to use one of the new function gives a similar error:
error LNK2019: unresolved external symbol __imp__nlopt_cre...@8 referenced in function [...]

The program 'Dependency Walker' shows for the 1.2 version that the function name is
  nlopt_minimize_constrained
and for version 2.0.2 it is
  nlopt_minimize_constrai...@96

I know the problem itself might not be NLopt-specific but some naming convention thing, but since I have not much experience dealing with DLLs, any help is appreciated!

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

Reply via email to