我在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新用户的新手,因此将非常感谢您的帮助。

最佳答案

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

这解决了我的问题。

关于c++ - 在Visual Studio 2010中无法编译gloox库项目,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/28319149/

10-13 08:28