Settings of Visual Studio to remove dependency on a dll file during runtime

后端 未结 1 757
梦如初夏
梦如初夏 2021-01-22 15:38

Everywhere people are suggesting how to let visual studio know when visual studio at run time doesn\'t find a dll. But I want to know where do I remove the option so that visual

相关标签:
1条回答
  • 2021-01-22 16:16

    Several options are available:

    1. Remove the import library file from your project. Go to the Visual Studio linker settings and remove the entry (Properties -> Linker -> Input).

    2. If the library is specified by a #pragma comment(lib:"xxxx") (http://support.microsoft.com/kb/153901), then remove that line from your source file(s) and rebuild your application.

    3. If you really want to use the library, but only if certain runtime conditions are met, then use 1. or 2. above, but change your source code to use LoadLibrary and GetProcAddress to dynamically load the library and obtain the function pointers at runtime.

    There is also a thing called Delay Loaded DLL's. If this is what you're after, here is the link to the information: http://msdn.microsoft.com/en-us/library/151kt790.aspx

    0 讨论(0)
提交回复
热议问题