0

I have been trying to parse an xml document by using libxml2, and I am using Dev c++ for compilation. I couldn't figure out how to utilize libxml2/parser.h? I am getting the error

no such file or directory

(I am using windows)

6
  • you are getting the error by .. doing what? calling which function call? Commented Jan 2, 2013 at 11:44
  • I cannot compile the source file Commented Jan 2, 2013 at 11:47
  • 2
    so your question is not about xml or libxml2 or xyz but "how to compile a file with a c-compiler"? then you should give information about how you invoke which c-compiler and where the c-code is. Commented Jan 2, 2013 at 11:48
  • please show us some code (your compile-command f.e. the -I includepath and the line of your #include "libxml\parser.h". Commented Jan 2, 2013 at 12:21
  • windows and "/" in path? is that okay? in thee olde dayes, it was a "\" for path. Commented Jan 2, 2013 at 12:22

1 Answer 1

1

The libxml2 bundle normally is not installed into a standard path (under unix f.e. /usr/include), so you have to tell the compiler/IDE where you installed the include and the library (f.e. /home/include). In modern IDEs this can be achieved just by dragging/dropping the library into the project. In other environments you have to adjust your makefile or you system (environment variable) to point the include-path to your libxml2-directorys include path (-I with gcc) and library path (-L). In your IDE you may have a option/project settings to do so.

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

Comments

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.