delay load and warning LNK4199 
Author Message
 delay load and warning LNK4199

Hi,

I have a "base.dll" which I want to delay load into some "userx.dll"s. So I
added the base.lib and the /delayload:base.dll switches to the project
settings of my user dlls. That works all fine. But for each dll I have to
adjust the project settings, so I looked for an alternative and I've found
some pragmas which would do the job, I think:

I added to my "base.h", which is included in the user dlls through the
stdafx.h:
...
#ifndef BASE_EXPORTS
#pragma comment(lib, "base")
#pragma comment(linker, "/delayload:base.dll")
#endif
...

Regarding to depends.exe this seems also to work correct, but I'm getting
some linker warnings:
Linking...
LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
Base.dll
   Creating library Debug/User1.lib and object Debug/User1.exp
LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
Base.dll
LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
Base.dll

Is there a chance to disable this warning? (#pragma warning(disable:4199)
doesn't work!)

Best regards

Tobias Pongs



Sun, 21 Aug 2005 21:57:02 GMT  
 delay load and warning LNK4199
If you are using VC6 please try linker switch /IGNORE: 4199 to disable
linker warning 4199.
--------------------

::Newsgroups: microsoft.public.vc.language
::Subject: delay load and warning LNK4199
::Date: Wed, 5 Mar 2003 14:57:02 +0100
::Organization: Vector Informatik GmbH
::Lines: 37

::NNTP-Posting-Host: ps435pcd.vi.vector.int
::X-Trace: vistranem1.vi.vector.int 1046872622 22723 10.49.14.242 (5 Mar
2003 13:57:02 GMT)

::NNTP-Posting-Date: Wed, 5 Mar 2003 13:57:02 +0000 (UTC)
::X-Priority: 3
::X-MSMail-Priority: Normal
::X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
::X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
::Path:
cpmsftngxa06!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!new
s1.dtag.de!news.vector-informatik.de!not-for-mail
::Xref: cpmsftngxa06 microsoft.public.vc.language:184571
::X-Tomcat-NG: microsoft.public.vc.language
::
::Hi,
::
::I have a "base.dll" which I want to delay load into some "userx.dll"s. So
I
::added the base.lib and the /delayload:base.dll switches to the project
::settings of my user dlls. That works all fine. But for each dll I have to
::adjust the project settings, so I looked for an alternative and I've found
::some pragmas which would do the job, I think:
::
::I added to my "base.h", which is included in the user dlls through the
::stdafx.h:
::...
::#ifndef BASE_EXPORTS
::#pragma comment(lib, "base")
::#pragma comment(linker, "/delayload:base.dll")
::#endif
::...
::
::Regarding to depends.exe this seems also to work correct, but I'm getting
::some linker warnings:
::Linking...
::LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
::Base.dll
::   Creating library Debug/User1.lib and object Debug/User1.exp
::LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
::Base.dll
::LINK : warning LNK4199: /DELAYLOAD:Base.dll ignored; no imports found from
::Base.dll
::
::Is there a chance to disable this warning? (#pragma warning(disable:4199)
::doesn't work!)
::
::
::Best regards
::
::Tobias Pongs
::
::
::

This posting is provided "AS IS" with no warranties, and confers no rights.



Mon, 22 Aug 2005 23:48:18 GMT  
 delay load and warning LNK4199
Hi Justin,

yes that works. Thanks.

Best regards

Tobias Pongs



Quote:
> If you are using VC6 please try linker switch /IGNORE: 4199 to disable
> linker warning 4199.

> This posting is provided "AS IS" with no warranties, and confers no
rights.



Tue, 23 Aug 2005 18:02:27 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Need help with annoying warning: LINK : warning LNK4199: /DELAYLOAD:mtxex.dll ignored

2. Delay Loading oleacc.dll

3. delay load of DLLs

4. Long delays loading files

5. Delay Load Imports

6. problem with delay loading DLLs

7. problem with delay loading DLLs

8. Delaying loading of DLLs

9. Delay Load DLL doesn't work for C++ DLL

10. problem with delay loading DLLs

11. reduce delay of delete... (deleting longer than loading)

12. Delaying loading of DLLs

 

 
Powered by phpBB® Forum Software