0

I am in the process of porting my windows console application to Linux (Ubuntu 12.04). I am using the GNU GCC compiler to compile my application. However I can't seem to get rid of some errors, this code does function in windows with libxml2 but can't compile here.

In my build options I have included to search the path usr/include/libxml2. When I compile i still recieve the error:

    Datadictionary.c|| undefined reference to `xmlCheckVersion'|
    Datadictionary.c|| undefined reference to `xmlStrcmp'|
    Datadictionary.c|| undefined reference to `xmlGetProp'|    
    Datadictionary.c|| undefined reference to `xmlReadFile'|

Now i have looked anywhere but could not find a solution.

Please help.

1 Answer 1

1

You need to install

sudo apt-get install libxml2
sudo apt-get install libxml2-dev
sudo apt-get install libxslt-dev
sudo apt-get install xml-core

Then you need to set compliler option -I/usr/include/libxml2
and linker option -lxml2 -lm

And use # include<libxml/parser.h> instead #include "libxml/parser.h"

Also you need to clear all previous search path settings

Sign up to request clarification or add additional context in comments.

1 Comment

please, can you explain how? 'make -l/usr(include...' ? or './configure/usr(include...'? etc thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.