简体   繁体   English

尝试打开文件对话框,comdlg32.lib 在哪里?

[英]Trying to open a file dialog, where is comdlg32.lib?

Running this code in Code::Blocks 20.03, got a #pragma comment(lib, "comctl32.lib") in my header, no joy .在 Code::Blocks 20.03 中运行此代码,在我的header得到一个#pragma comment(lib, "comctl32.lib") ,不高兴。 I know I need to add it to the linker, as done here , but WHERE is the comctl32.lib file?我知道我需要将它添加到 linker 中, 如此处所做的那样,但是comctl32.lib文件在哪里?

Edit : fixed the Pragma, but the problem still happens.编辑:修复了 Pragma,但问题仍然存在。

Your #pragma is specifying the wrong filename.您的#pragma指定了错误的文件名。 GetOpenFileName() is implemented in comdlg32.dll , not in comctl32.dll . GetOpenFileName()comdlg32.dll中实现,而不是在comctl32.dll中实现。 The correct lib filename you need to use is comdlg32.lib .您需要使用的正确 lib 文件名是comdlg32.lib This is stated as much in the function's documentation :这在函数的文档中有很多说明:

图片

Once you correct that, if you still get the same error, then you likely don't have the Windows SDK installed for your compiler, or you don't have your compiler's search paths setup properly to find the SDK files.更正后,如果您仍然遇到相同的错误,那么您可能没有为您的编译器安装 Windows SDK,或者您没有正确设置编译器的搜索路径来查找 ZF20E3C5E54C0AB3D37BAZF60666

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM