在ubuntu上编译代码块中的Libxml2时出错
我正在将我的windows控制台应用程序移植到Linux(Ubuntu 12.04)。我正在使用GNU GCC编译器编译我的应用程序。然而,我似乎无法消除一些错误,这段代码在使用libxml2的windows中确实起作用,但无法在这里编译 在我的构建选项中,我包括了搜索路径usr/include/libxml2。编译时,我仍然收到错误:在ubuntu上编译代码块中的Libxml2时出错,ubuntu,compilation,undefined,libxml2,Ubuntu,Compilation,Undefined,Libxml2,我正在将我的windows控制台应用程序移植到Linux(Ubuntu 12.04)。我正在使用GNU GCC编译器编译我的应用程序。然而,我似乎无法消除一些错误,这段代码在使用libxml2的windows中确实起作用,但无法在这里编译 在我的构建选项中,我包括了搜索路径usr/include/libxml2。编译时,我仍然收到错误: Datadictionary.c|| undefined reference to `xmlCheckVersion'| Datadiction
Datadictionary.c|| undefined reference to `xmlCheckVersion'|
Datadictionary.c|| undefined reference to `xmlStrcmp'|
Datadictionary.c|| undefined reference to `xmlGetProp'|
Datadictionary.c|| undefined reference to `xmlReadFile'|
现在我到处找,但找不到解决办法
请帮助。您需要安装
sudo apt get install libxml2
sudo apt get安装libxml2 dev
sudo apt get安装libxslt dev
sudo-apt-get-install-xml-core
然后需要设置compliler选项-I/usr/include/libxml2
和链接器选项-lxml2-lm
并使用
#include代替#include“libxml/parser.h”
您还需要清除所有以前的搜索路径设置请解释如何清除make-l/usr(包括…?)或“/configure/usr(包括…?”等,谢谢