473,324 Members | 2,214 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,324 software developers and data experts.

7.1: How to specify delayload in cpp file?

Hi all,

I wonder how to specify the delayload option for the linker in a cpp file.
In VC 6 this was possible by writing

#pragma comment (linker, "/delayload:some_lib.dll")
When I do the same in 7.1, I get the message

abc.lib(xy.obj) : warning LNK4229: invalid directive
'/DELAYLOAD:some_lib.dll' encountered; ignored

although the syntax of the option is correct IMO.
Any solutions?

Thanks,

Stefan
Nov 16 '05 #1
4 7888
>I wonder how to specify the delayload option for the linker in a cpp file.
In VC 6 this was possible by writing

#pragma comment (linker, "/delayload:some_lib.dll")
When I do the same in 7.1, I get the message


Stefan,

I can only assume that's been dropped from the compiler. In VS you can
specify the delay load DLLs in the IDE's linker project settings.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #2
Hi David,

the message

abc.lib(xy.obj) : warning LNK4229: invalid directive
'/DELAYLOAD:some_lib.dll' encountered; ignored

tells me, that is has not been dropped but that the linker obviously has a
problem with interpreting it correctly. The project option doesn't help in
some cases where you automatically want to import a library based on using a
particular cpp file. (You also speficy #pragma comment (lib, "....") then!)

Stefan

"David Lowndes" <da****@mvps.org> schrieb im Newsbeitrag
news:n1********************************@4ax.com...
I wonder how to specify the delayload option for the linker in a cpp file.In VC 6 this was possible by writing

#pragma comment (linker, "/delayload:some_lib.dll")
When I do the same in 7.1, I get the message


Stefan,

I can only assume that's been dropped from the compiler. In VS you can
specify the delay load DLLs in the IDE's linker project settings.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq

Nov 16 '05 #3
>the message

abc.lib(xy.obj) : warning LNK4229: invalid directive
'/DELAYLOAD:some_lib.dll' encountered; ignored

tells me, that is has not been dropped but that the linker obviously has a
problem with interpreting it correctly.


Yeah, but maybe that amounts to the same thing :)

If someone from MS doesn't comment on this thread soon I'll try to
report it to them.

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #4
Stefan,

The comment from MS is that the new behaviour is expected. The
previous behaviour with VC6 was not intentional and could lead to
problems (I don't know what they may be though).

Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Larry Woods | last post by:
I have a custom 404 error page. When I change my site properties in IIS (IIS 5.0, BTW) to point to a file, I still get the original 404 error page. But, then I copied my error page to my root,...
1
by: Till Soerensen | last post by:
I would like to validate a xml file against a xsd file on my hard disc. Ok, I could specify the location of the XSD Schema in the instance of the xml file as follows: <Person...
3
by: Mathew | last post by:
Hi How do you specfiy the version of the .net runtime libraries loaded for a ..net controls hosted in Internet Explorer 6? I have a control that's designed to work with .NET 1.1, but after...
3
by: Daniel Xiao | last post by:
As we know, a App.config file can be specified in a C# project in the .Net IDE. However, how to specify the App.config file for a C# program independent of any C# project? For example, a.cs is such...
6
by: Stefan Slapeta | last post by:
The following linker directive #pragma comment (linker, "/delayload:xy.dll") which was valid in VC 6 produces just a warning in VC 7.1 (though the directive is ok, IMO). Is this fixed in...
3
by: HairlipDog58 | last post by:
I have a VC++6 project where I need to delay load a DLL. I used a structured exception handling frame and all seems to work when I build the debug version and run it (either in or out of the...
2
by: Tony | last post by:
Yes, I need to specify a font type so that the characters will be evenly spaced when I write to a tab delimited text file. So how does one specify a font type to write/print and which font is...
3
by: =?Utf-8?B?Q0QuU21hbGxleQ==?= | last post by:
Is there a command line switch available for the EventViewer which will allow me to specify which directory to view the available logs from? I will have multiple workstations writing to a...
0
by: rrenaud | last post by:
What is the reason for delayload=False in the FileCookieJar.__init__ function? It doesn't seem to be used in any of the code that ships with python2.4, and it seems to directly contradict the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.