0

我在将 minixml 库拉入我的项目时遇到问题。

我在这里遵循了 minixml 页面上的文档http://www.minixml.org/documentation.php/install.html

安装没有错误,我在 /usr/local/include/mxml.h 中看到了 .h 文件,在 /usr/local/lib/libmxml.a 中看到了程序集文件

我已经包含了 mxml.h#define<mxml.h>并且发现该文件没有问题(因为迷你 xml 类型没有错误,例如 mxml_node_t 等......

我也一直在使用 -lmxml 编译标志进行编译以链接库。

gcc -lpthread -lmxml    -o...and so forth

undefined reference to `mxmlNewXML'

这是我如何调用与原型匹配的函数:

mxmlNewXML("blah");
4

1 回答 1

0

i am also using this library. I suggested you to compile your code like this

by installing process you will get libmxml.a in your mxml package so now link that library with its whole path

gcc path_to_thatlibrary/libmxml.a -lpthread

Edit :

in your way does your code gets succesfully compile? what error it shows?

于 2011-09-03T08:10:55.217 回答