报错信息
Generating Code...
Linking...
Creating library Release/Iodevcfg.lib and object Release/Iodevcfg.exp
ItemConfigDlg.obj : error LNK2001: unresolved external symbol "public: __thiscall CMarkup::~CMarkup(void)" (??1CMarkup@@QAE@XZ)
ItemConfigDlg.obj : error LNK2001: unresolved external symbol "public: bool __thiscall CMarkup::SetDoc(char const *)" (?SetDoc@CMarkup@@QAE_NPBD@Z)
ItemConfigDlg.obj : error LNK2001: unresolved external symbol "protected: void __thiscall CMarkup::x_InitMarkup(void)" (?x_InitMarkup@CMarkup@@IAEXXZ)
C:\Program Files\ForceControl V7.1\IO Servers\BC_ADLink_ACL6127\Iodevcfg.dll : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
解决方案:
首先将文件添加进工程,右键选择 Add Files to Project…,选择对应的文件Markup.cpp, Markup.h
其次看图标Markup.cpp 与其他图标存在不一样:Project ->Setting ->选择对应的文件 ->取消勾选Exclude file from build就欧克了!
勾选Exclude file from build表示:屏蔽文件,不进行编译