Can anyone explain to me that error and what should I do to solve it !?:

In file included from /home/jros/catkin_ws/src/kinectueye/include/MIXEDVISION/CModelStereoXml.h:6:0,
                 from /home/jros/catkin_ws/src/kinectueye/src/kinect_ueye.cpp:10:
/home/jros/catkin_ws/src/kinectueye/include/MIXEDVISION/CXml.h:6:31: fatal error: libxml/xmlmemory.h: No such file or directory
compilation terminated.

CModelStereoXml, CXml and xmlmemory all are files in a library (so I can't edit it) that I use in my program kinect_ueye.cpp.

share|improve this question
3  
Most likely you need to set your include path to include the directory where libxml is. – chris Jul 9 '14 at 14:55
    
I have others lib in the same diretory and all work fine only this one? – RosCpp Jul 9 '14 at 15:00
1  
Might it be that you need to do sudo apt-get install libxml2-dev libxslt-dev? (Assuming ubuntu as distro.) – Tobias Jul 9 '14 at 15:02
    
@Tobias I did but it doesn't work – RosCpp Jul 10 '14 at 7:56
up vote 4 down vote accepted

It says CXml.h line 6 is:

#include <libxml/xmlmemory.h>

But libxml/xmlmemory.h is not in your include path. The include path is set with -I options on the compiler command line.

The error is "fatal" because compilation cannot continue past that point.

Find out where that file is actually installed and make sure the path to its libxml directory is in a -I option. For example, if it's installed in /opt/local/include/libxml/xmlmemory.h, then you need -I /opt/local/include on your command line.

CModelStereoXml, CXml and xmlmemory all are files in a library (so I can't edit it)

Only the compiled code is in a library (.a, .la, or .so file) that you can't edit. The headers will be located somewhere else.

share|improve this answer
    
Thank you. This is what I'm looking for. just for more information :how can I do that without changing the compiler command line ? – RosCpp Jul 10 '14 at 7:56
    
I have no idea what kind of build system you're using. If you're using makefiles, then you can put a line like INCLUDES += -I /opt/local/include into your top-level Makefile. If you're using an IDE such as Eclipse, there should be a field in a dialog box for "include paths" that you put it in. – Mike DeSimone Jul 10 '14 at 12:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.