Ubuntu Eclipse libxml2错误:致命错误:libxml / xmlversion.h:没有这样的文件或目录 [英] Ubuntu Eclipse libxml2 error : fatal error: libxml/xmlversion.h: No such file or directory
问题描述
g ++ main.cpp -I / usr / include / libxml2 -lxml2 -o output
但是我不能在eclipse上使用。我添加C ++ Build-> Setting-> GCC C Compiler->包含
-I / usr / include / libxml2
,我添加C ++ Build-> Setting-> GCC C ++ Linker->图书馆
-lxml2
但是当我建立我的项目时,我会通过
libxml / parser.h:15:31:致命错误:libxml / xmlversion.h:没有这样的文件或目录
这是因为libs不完整。你应该安装它们。
一个解决方案: p>
sudo apt-get install libxml2-dev libxslt1-dev
对于Redhat / Centos / Fedora:
yum install libxml-devel
I want to use libxml2 in my eclipse project. I can use this library on command line by "
g++ main.cpp -I/usr/include/libxml2 -lxml2 -o output "
But I can't use on eclipse.I add C++ Build->Setting->GCC C Compiler->Includes
-I/usr/include/libxml2 and I add C++ Build->Setting->GCC C++ Linker->library -lxml2
But When I build my project, I get an error via
libxml/parser.h:15:31: fatal error: libxml/xmlversion.h: No such file or directory
This is because libs are not complete. You should install them.
Here's one thread that might be helpful.
One solution:
sudo apt-get install libxml2-dev libxslt1-dev
For Redhat/Centos/Fedora:
yum install libxml-devel
这篇关于Ubuntu Eclipse libxml2错误:致命错误:libxml / xmlversion.h:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!