473,396 Members | 2,087 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

makefile problem

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
2 1417

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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bryan Olson | last post by:
Here's the problem: Suppose we use: import socket f = some_socket.makefile() Then: f.read() is efficient, but verbose, and incorrect (or at least does not play will with others);
3
by: tmponko | last post by:
OK...I'm new to this and I'm sure I'm missing something obvious, so please be kind. I've tried several different approaches to this problem (including various if, ifeq, and case constructs), and...
1
by: Gg | last post by:
Hi, I have a project that depends on other projets. So I have a Makefile that calls Makefile of sub-projects to build the libs if needed. Once libs are built, the main Makefile link everything...
7
by: Dave | last post by:
Does anyone know of a Windows compatible command line tool that capable of parsing Microsoft's VC++ workspace/project (e.g., .dsw, .dsp, .sln, ..vcproj, etc.) files and generating an...
2
by: Juhan Voolaid | last post by:
Hello I need help with my makefile, so that when I compile my project the source code files would be separated from the object (*.o) files. So if I have: main.cpp and classes.cpp - the...
6
by: dolphin | last post by:
Hi! I am learing makefile recently.Now I have a problem. I write a very simple program just like "hello world" I write two makefile for it.One is included in another. the first is makefile...
1
by: %NAME% | last post by:
I wish to put a number of .db2 scripts in my makefile. However, some of the db2 scripts tries to revoke privileges from users that might do not have that privilege already, thus returns an error...
6
by: ahlongxp | last post by:
socket.makefile() may lose data when "connection reset by peer". and socket.recv() will never lose the data. change the "1" to "0" in the client code to see the difference. confirmed on both...
1
by: rpjanaka | last post by:
I am using an open source library called IGI_UDP for measure the available bandwidth of a link (http://www.cs.cmu.edu/%7Ehnn/igi/ ). with that library they have provided a "Makefile" which is not an...
2
by: chutsu | last post by:
I'm basically a summer student working on a program called Rivet. (http://projects.hepforge.org/rivet/) And I'm trying to port it to BOINC so that the hosts can download the BOINC client and do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.