Below that I have the import library needed included in a pragma:
#pragma link "MyDLL.lib"
Is there a pragma that I can add in the code to mark MyDLL.dll as delay-loaded
or pass the -d"MyDLL.dll" to the linker? I have an unknown number of projects
and don't want to search out and modify the project options on each one.
I'd much rather add one line of code in one file and be done with it.
Thank you,
Ben Brandt
> Is there a pragma that I can add in the code to mark
> MyDLL.dll as delay-loaded or pass the -d"MyDLL.dll" to the linker?
In VC++ v6 (but not in v7), you can use #pragma command for that, ie:
#pragma comment(lib, "MyDll.lib")
#pragma comment(linker, "/delayload:MyDLL.dll")
I don't know if Borland/CodeGear's compiler supports the "linker" flag.
Gambit
Unfortunately this is not permitted. In theory #pragma option could be
used for this but unfortunately it does not permit passing of that
option. #pragma comment does not support passing options to linker.
Conclusion is that you must supply -d option as a command line parameter.