シンプルな tinylibxml プログラムを実行しようとすると、エラーが発生します。
OS -> Ubuntu IDE -> e apt-get install を介して 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);
}
}
グーグルで調べたところ、libtinyxml.cpp とその他のファイルを含める必要があることがわかりました。皆さん、その方法を教えてください。
ありがとう