在C ++程序中包含ezXML(XML Parsing C Library)

时间:2016-04-09 08:39:52

标签: c++ c xml-parsing

我正在开发一个C ++项目,我使用的是用C语言编写的ezXML(http://ezxml.sourceforge.net/)。默认情况下,库包含ezxml.h文件中的#ifdef __cplusplus保护(见下文)。但是,每当我尝试使用g ++ main.cpp命令编译代码时,都会收到以下链接错误:

<script>
    $('#userdetail').submit(function(){
    if($('#terms').is(':checked'))
    {
         return true;
    }
    else
    {
      return false;
    }
    });
</script>

ezxml.h

/tmp/cccsTF8t.o: In function `main':
main.cpp:(.text+0x54): undefined reference to `ezxml_parse_file'
main.cpp:(.text+0x69): undefined reference to `ezxml_child'
main.cpp:(.text+0x89): undefined reference to `ezxml_child'
main.cpp:(.text+0x9e): undefined reference to `ezxml_child'
main.cpp:(.text+0xb3): undefined reference to `ezxml_child'
main.cpp:(.text+0xc8): undefined reference to `ezxml_child'
/tmp/cccsTF8t.o:main.cpp:(.text+0xfc): more undefined references to `ezxml_child' follow
/tmp/cccsTF8t.o: In function `main':
main.cpp:(.text+0x194): undefined reference to `ezxml_attr'
main.cpp:(.text+0x1a9): undefined reference to `ezxml_child'
main.cpp:(.text+0x1be): undefined reference to `ezxml_child'
main.cpp:(.text+0x1d3): undefined reference to `ezxml_child'
main.cpp:(.text+0x1e8): undefined reference to `ezxml_child'
main.cpp:(.text+0x1fd): undefined reference to `ezxml_child'
main.cpp:(.text+0x258): undefined reference to `ezxml_free'
collect2: error: ld returned 1 exit status

0 个答案:

没有答案