首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > VC/MFC >

是不是全局函数调用不对导致的这个报错?解决思路

2012-01-12 
是不是全局函数调用不对导致的这个报错??SerialPortAPIDlg.cppLinking...SerialPortAPIDlg.obj : error LN

是不是全局函数调用不对导致的这个报错??
SerialPortAPIDlg.cpp
Linking...
SerialPortAPIDlg.obj : error LNK2001: unresolved external symbol "unsigned long __stdcall SerialPort1ThreadProcess(struct HWND__ *)" (?SerialPort1ThreadProcess@@YGKPAUHWND__@@@Z)
Debug/SerialPortAPI.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.


 
在SerialPortControl.CPP文件中定义的,
在调用SerialPort1ThreadProcess的文件中#include "SerialPortControl.h"了头文件,并且SerialPortControl.h中申明了这个全局函数!
extern DWORD WINAPI SerialPort1ThreadProcess(HWND hWnd);

[解决办法]
一定要保证所有函数的实现部分都被加入到了工程里
[解决办法]
看看是否你cpp的实现那里的函数名字和你h里面定义的函数名字不符。

热点排行