error LNK2001,来看一看。

ayqlj 2004-05-09 11:53:10
我在把一个控件编译为ReleaseMinDependency时,下面一些函数出现如下问题,
error LNK2001: unresolved external symbol __imp__ImageList_LoadImageA@28
error LNK2001: unresolved external symbol __imp__ImageList_DrawIndirect@4
error LNK2001: unresolved external symbol __imp__ImageList_DrawIndirect@4
error LNK2001: unresolved external symbol __imp__ImageList_GetImageInfo@12
error LNK2001: unresolved external symbol __imp__ImageList_GetImageInfo@12
error LNK2001: unresolved external symbol __imp__ImageList_GetImageCount@4

微软这样说:
The Microsoft® Win32® application programming interface (API) provides image list functions that enable you to create and destroy image lists, add and remove images, replace and merge images, draw images, and drag images.

To use the image list functions, include the common control header file in your source code files and link with the common control export library. In addition, before calling any image list function, use the InitCommonControls function to ensure that the common control dynamic-link library (DLL) is loaded.

我不知道该怎么解决。
help me please.
...全文
51 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
ayqlj 2004-05-10
  • 打赏
  • 举报
回复
谢谢各位,学了好多东西。
wangweixing2000 2004-05-09
  • 打赏
  • 举报
回复
#include "commctrl.h"
#pragma comment(lib, "comctl32.lib")
lincoder666 2004-05-09
  • 打赏
  • 举报
回复
up
swbreath 2004-05-09
  • 打赏
  • 举报
回复
在Alt+F7的Link的选项卡中的下面的编辑框中添加这个库:comctl32.lib
快乐鹦鹉 2004-05-09
  • 打赏
  • 举报
回复
To use the image list functions, include the common control header file in your source code files and link with the common control export library
-----------------------------------
你包含这个library了吗?
ruihuahan 2004-05-09
  • 打赏
  • 举报
回复
__imp__ImageList_LoadImageA@28
__imp__ImageList_DrawIndirect@4
__imp__ImageList_DrawIndirect@4
__imp__ImageList_GetImageInfo@12
__imp__ImageList_GetImageInfo@12
__imp__ImageList_GetImageCount@4
这些函数是从.idl文件生成的接口函数的proxy/stub函数,函数定义在.idl文件用midl编译后生成的xxxx_c.c中,把这个文件用cl编译后生成.obj文件。
你的工程要连接这个.obj文件,才能连接进proxy/stub代码。
通常情况下,工程会设置为自动连接进这个obj文件。
出现这个错误可能是你的设置参数有问题。

3,245

社区成员

发帖
与我相关
我的任务
社区描述
ATL,Active Template Library活动(动态)模板库,是一种微软程序库,支持利用C++语言编写ASP代码以及其它ActiveX程序。
社区管理员
  • ATL/ActiveX/COM社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧