minixml 未定义对“mxmlNewXML”的引用;
我在将 minixml 库拉入我的项目时遇到问题。
我按照此处的 minixml 页面上的文档 http://www.minixml.org/documentation.php /install.html
安装没有错误,我在 /usr/local/include/mxml.h 中看到 .h 文件,在 /usr/local/lib/libmxml.a 中
看到 程序集文件包含 mxml.h 与#define
并且发现该文件没有问题(因为迷你 xml 类型没有错误,例如 mxml_node_t 等...
我也一直在使用 -lmxml 编译标志进行编译 这是我调用该
gcc -lpthread -lmxml -o...and so forth
undefined reference to `mxmlNewXML'
函数的方式,它与原型相匹配:
mxmlNewXML("blah");
I am having a problem getting the minixml library pulled into my project.
I followed the documentation on minixml page here http://www.minixml.org/documentation.php/install.html
There were no errors doing the install and I see the .h file in /usr/local/include/mxml.h and the assembly file in /usr/local/lib/libmxml.a
I have included mxml.h with #define<mxml.h>
and it is finding that file no problem(as there are no errors from the mini xml types such as mxml_node_t etc...
I have also been compiling with -lmxml compile flag to link the library.
gcc -lpthread -lmxml -o...and so forth
undefined reference to `mxmlNewXML'
Here is how I call the function, which matches the prototype:
mxmlNewXML("blah");
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也在使用这个库。我建议您通过安装过程来编译代码,
您将在 mxml 包中获得 libmxml.a
所以现在将该库与其整个路径链接起来
编辑:
以您的方式您的代码是否成功编译?它显示什么错误?
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
Edit :
in your way does your code gets succesfully compile? what error it shows?