473,421 Members | 1,545 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,421 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 7899
>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: 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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.