首页
社区
课程
招聘
[求助]关于链接时出的错误 error LNK2001: unresolved external symbol
发表于: 2007-5-30 13:06 10293

[求助]关于链接时出的错误 error LNK2001: unresolved external symbol

2007-5-30 13:06
10293
出错信息
Temperature.obj : error LNK2001: unresolved external symbol _MoveToEx@16
Temperature.obj : error LNK2001: unresolved external symbol _LineTo@12
Temperature.obj : error LNK2001: unresolved external symbol _CreateSolidBrush@4
Temperature.obj : error LNK2001: unresolved external symbol _GetStockObject@4
Temperature.obj : error LNK2001: unresolved external symbol _Arc@36
Temperature.obj : error LNK2001: unresolved external symbol _Pie@36
Temperature.obj : error LNK2001: unresolved external symbol _DeleteObject@4
Temperature.obj : error LNK2001: unresolved external symbol _SelectObject@8
Temperature.obj : error LNK2001: unresolved external symbol _wsprintfA
Temperature.obj : error LNK2001: unresolved external symbol _Rectangle@20
LINK : error LNK2001: unresolved external symbol __DllMainCRTStartup@12
我的头文件如下:
include \masm32\include\windows.inc
include \masm32\include\user32.inc
include \masm32\include\kernel32.inc
include \masm32\include\Gdi32.inc
;some library files
includelib \masm32\lib\user32.lib
includelib \masm32\lib\kernel32.lib
includelib \masm32\lib\Gdi32.lib
不知道为什么还会出错,MoveToEx、LineTo等api不是都在gdi32.lib中吗?怎么还是出错?

[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)

收藏
免费 0
支持
分享
最新回复 (1)
雪    币: 139
活跃值: (126)
能力值: ( LV8,RANK:130 )
在线值:
发帖
回帖
粉丝
2
Could be my wrong understanding. Seems that the compiler thinks the APIs your code referenced is in C++, and in fact these functions are in C, I mean the calling style.

Since your code is in assembly, I'm not sure how to deal with that. But if your code is in C/C++,better use #ifdef __cplusplus.

For your own exported functions, better do it in this way, for example:

extern "C" yourFunc(...)
2007-5-31 23:18
0
游客
登录 | 注册 方可回帖
返回
//