Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » libxml2(compile and link libxml2)
libxml2 [message #818514] Sun, 11 March 2012 19:21 Go to next message
ak jax is currently offline ak jaxFriend
Messages: 7
Registered: March 2012
Junior Member
I try to use libxml2 in a C++ project, and I use Eclipse to edit and compile

Running this on the command line
xml2-config --cflags

Running this on the command line
xml2-config --libs

In ordinary Makefile I should write:

CFLAGS=`xml2-config --cflags`

LIBS=`xml2-config --libs`

In the menu:
Project\settings\Tool Settings\GCC C++ Linker\Miscellaneous\Linker flags
I have enter -lxml2

Where shall I insert following line in eclipse

It seems that Eclipse cannot found the library

Is there something else I need to do?

[Updated on: Sun, 11 March 2012 19:45]

Report message to a moderator

Re: libxml2 [message #818760 is a reply to message #818514] Mon, 12 March 2012 04:34 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3799
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 2012.03.11 13:21, Ake Jacksen wrote:
> I try to use libxml2 c++ project that I use Eclipse to edit and compile
> when running the line below on command line:
> xml2-config --cflags
> I get
> -I/usr/include/libxml2
> when running the line below on command line:
> to get the compilation flags and
> xml2-config --libs
> I get:
> -lxml2
> I an ordinary make file I should do following:
> CFLAGS=`xml2-config --cflags`
> LIBS=`xml2-config --libs`
> Project\Settings\Tool Settings\GCC C++ linker\Miscellaneouslinker flags
> I have added
> -lxml2
> Where do I put
> -I/usr/include/libxml2
> Is it something else i need to do to get this working?

As the sticky posts at the top of this forum say, please ask your C/C++
questions in the Eclipse CDT forum.
Previous Topic:[SOLVED] Content/Code Assist Broken?
Next Topic:Eclipse RCP - How to show web browser preferences in preference dialog if it is not there
Goto Forum:

Current Time: Fri Jun 22 17:07:50 GMT 2018

Powered by FUDForum. Page generated in 0.02725 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top