开发者

A link problem with Windows 7 shell functions

开发者 https://www.devze.com 2023-01-16 05:19 出处:网络
I\'m trying to enumerate files through the Windos 7 library API, e.g. with SHLoadLibraryFromKnownFolder

I'm trying to enumerate files through the Windos 7 library API, e.g. with SHLoadLibraryFromKnownFolder

I'm using a C++ win32 console application and getting link errors, e.g.,

Error LNK2019: unresolved external symbol __imp__DSA_DestroyCallback@12 referenced in function "void __cdecl DSA_DestroyCallback(struct _DSA *,int (__stdcall*)(void const *,void *),void *开发者_Go百科)" (?DSA_DestroyCallback@@YAXPAU_DSA@@P6GHPBXPAX@Z2@Z)

These errors appear even if I only #include <ShlObj.h>

Should I add some specific library to the linker inputs? Thanks, R.


The documentation for DSA_DestroyCallback states that you need to link against Comctl32.lib.


The linker can't find DSA_DestroyCallback. That function is in Comctl32.lib. Did you include that import library?

(Add #pragma comment(lib, "comctl32.lib") if you are on MSVC)

0

精彩评论

暂无评论...
验证码 换一张
取 消