So I have a Visual Studio 2013 Lib Project.
I using CryptProtectData function, so I'm linking crypt32.lib
Method 1 - Project properties: Additional dependencies
I added crypt32.lib to:
Configuration Properties => Librarian => General=> Additional Dependencies
Method 2 - #pragma comment(lib)
Added: #pragma comment(lib,"crypt32.lib") to the the cpp source file using CryptProtectData
Question
Why Method 1 generates this linker warning:
crypt32.lib(CRYPT32.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in mstask.lib(mstask.dll); second definition ignored
while Method 2 does not?
Notes:
Read the following posts with not luck:
- VS 2010 - #pragma comment (lib, XX) works, Additional Dependencies doesn't. Why?
- What is the difference between using #pragma lib and "Additional Dependencies"?
- Trying to add User32.lib to linker instead of using #pragma comment (lib, "User32.lib")
Aucun commentaire:
Enregistrer un commentaire