By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,257 Members | 925 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,257 IT Pros & Developers. It's quick & easy.

makefile problem

P: n/a
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
Apr 5 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a

Ralf Propach wrote:
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/lib...91(VS.80).aspx for the
gory details.

Arnaud
MVP - VC

TIA

Ralf Propach


Apr 6 '06 #2

P: n/a
ad******@club-internet.fr wrote:


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/lib...91(VS.80).aspx for the
gory details.

Arnaud
MVP - VC
TIA

Ralf Propach


Yes, that was the problem!

Thanks!

Ralf
Apr 10 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.