linking problem with xml2

Hello,

I have a complicated cmake file and I want to compile my program with xml2 library.

The cmake run finds the xml2 libraries and also its include dir.

Found LibXml2: /opt/local/lib/libxml2.dylib (found version "2.9.4")
-- Looking for xmlTextWriterEndAttribute in /opt/local/lib/libxml2.dylib
-- Looking for xmlTextWriterEndAttribute in /opt/local/lib/libxml2.dylib - found
-- Looking for include file libxml/parser.h
-- Looking for include file libxml/parser.h - found

It compiles up to 100% of the process but at the linking time it apperantly does not use the xml2 as it gives error for all the xml codes I have.

parse.h and tree.h are also included in those files.

#include <libxml/parser.h>
#include <libxml/tree.h>

Any comments?

Thank you in advance,
M

CMake generates some kind of makefile. Look in that makefile and identify what it's doing to try to link against xml2; see if it's using the wrong name or wrong location or some such. CMake is magic that creates makefiles (or equivalent), so check the makefile it generated for a clue.
It does not add xml2 library into build.cmake while other libraries are linked properly?
I am confused because when I run cmake it finds the the xml2 library.

Topic archived. No new replies allowed.