makefile problem

R

Ralf Propach

I have a visual studio 2005 project that consists of two managed C++ classes
and some unmanaged C functions. The output of this project is a dll,
that is loaded by a program with LoadLibrary().
Then I have written a makefile that uses the same compiler and linker
options to generate this dll.

Now the dll created by the project works fine while the dll from the
makefile refuses to load (GetLastError returns 126, file not found).
In both cases LoadLibrary() is called with the absolute path, so there
is no way not to find it.

DUMPBIN /dependents shows the same dependencies, but under summary, the
project dll has one additional entry:
1000 .rsrc
The same for DUMPBIN /imports (plus a slight difference in the ordering of
the functions).
DUMPBIN /exports shows the functions like this:
8 7 00001040 freePointer for the project
8 7 00001F20 freePointer = _freePointer for the makefile

Can anybody say, what is wrong with my makefile?

Everything used to work before I upgraded to VS2005.

TIA

Ralf Propach
 
A

adebaene

Ralf said:
I have a visual studio 2005 project that consists of two managed C++ classes
and some unmanaged C functions. The output of this project is a dll,
that is loaded by a program with LoadLibrary().
Then I have written a makefile that uses the same compiler and linker
options to generate this dll.

Now the dll created by the project works fine while the dll from the
makefile refuses to load (GetLastError returns 126, file not found).
In both cases LoadLibrary() is called with the absolute path, so there
is no way not to find it.

DUMPBIN /dependents shows the same dependencies, but under summary, the
project dll has one additional entry:
1000 .rsrc
The same for DUMPBIN /imports (plus a slight difference in the ordering of
the functions).
DUMPBIN /exports shows the functions like this:
8 7 00001040 freePointer for the project
8 7 00001F20 freePointer = _freePointer for the makefile

Can anybody say, what is wrong with my makefile?

Everything used to work before I upgraded to VS2005.

I guess you're missing the manifest that is mandatory for linking
against the CRT in Visual 2005. This manifest is generated by the
linker and used by the manifest tool (mt.exe) to be embeeded in the DLL
as a ressource. See
http://msdn2.microsoft.com/en-US/library/ms235591(VS.80).aspx for the
gory details.

Arnaud
MVP - VC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top