当我尝试执行简单的tinylibxml程序时出现错误。链接问题tinylibxml C++ Ubuntu
OS - > Ubuntu的 IDE - 通过>电子 我有下载libtinyxml易于得到安装 并列入我的计划 的头,但我仍然得到错误 示例代码粘贴下面
#include "tinyxml.h"
#define TIXML_USE_STL
#include <tinyxml.h>
void dump_to_stdout(const char* pFilename);
int main()
{
dump_to_stdout("example1.xml");
return 0;
}
void dump_to_stdout(const char* pFilename)
{
TiXmlDocument doc(pFilename);
bool loadOkay = doc.LoadFile();
if (loadOkay)
{
printf("\n%s:\b", pFilename);
}
else
{
printf("Failed to load file \"%s\"\n", pFilename);
}
}
由于我没有使用Google,我发现我需要包含libtinyxml.cpp和其他一些文件。 请问你们,请指导我如何做到这一点。
感谢
如果添加错误消息,以及这将是有益的。添加代码时,请使用下面的格式代码按钮。它确实使它更具可读性。 – doron 2010-12-03 14:38:38
你正在得到什么错误? – misha 2010-12-03 14:39:08