无法在Visual Studio 2010中编译gloox库项目

时间:2015-02-04 10:35:09

标签: c++ visual-studio-2010 xmpp gloox

我在VS 2010中编译gloox时遇到问题。我正在收到错误报告:

1>------ Build started: Project: gloox-1.0, Configuration: Release Win32 ------
 Creating library C:\Install\gloox-1.0.13\Release\gloox-1.0.lib and object     C:\Install\gloox-1.0.13\Release\gloox-1.0.exp
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual   class gloox::IOData * __thiscall gloox::IOData::clone(void)const " (?clone@IOData@gloox@@UBEPAV12@XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual class gloox::Tag * __thiscall gloox::IOData::tag(void)const " (?tag@IOData@gloox@@UBEPAVTag@2@XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall gloox::IOData::~IOData(void)" (??1IOData@gloox@@UAE@XZ)
1>adhoc.obj : error LNK2001: unresolved external symbol "public: __thiscall gloox::IOData::IOData(class gloox::Tag const *)" (??0IOData@gloox@@QAE@PBVTag@1@@Z)
1>C:\Install\gloox-1.0.13\Release\gloox-1.0.dll : fatal error LNK1120: 4 unresolved externals

有人可以帮帮我吗,我在这里错过了什么?我是C ++编程和新VS用户的新手,所以任何帮助都会受到高度赞赏。

1 个答案:

答案 0 :(得分:3)

右键单击项目>添加>现有文件。 然后添加iodata.cpp和iodata.h。

这解决了我的问题。