User forums > Using Code::Blocks

[SOLVED] libxml2 include header files directory

(1/2) > >>

cbuser2:
Hi all. :)

I have header files in: /usr/include/libxml2/libxml/. This directory has the header file "parser.h", and other header files.

I go to project -> build options -> compiler -> search directories and add /usr/include/libxml2/libxml/

But the compiler gives the error: parser.h: no such file or directory. If I include the header file as an absolute path ie. "/usr/include/libxml2/libxml/parser.h", then the compiler would not give that error, but would now give another error about another header file which is also in the same directory.

I don't want to add absolute paths for multiple files, so what can I do? Thanks in advance.

stahta01:
Did you try just adding /usr/include/libxml2 to the include search path?

You likely need to read the library directions on the proper include method.

If it is
#include "libxml/parser.h"
then what I suggest is correct.

Edit: added normal option to try below.

Under "Global Compiler Settings"
Tab "build options"
Try checking "Explicitly add current compiling file's directory ...."

Tim S.

cbuser2:

--- Quote from: stahta01 on October 13, 2012, 01:29:28 am ---Did you try just adding /usr/include/libxml2 to the include search path? ....

Under "Global Compiler Settings"
Tab "build options"
Try checking "Explicitly add current compiling file's directory ...."

--- End quote ---

I can't find the include search path option in the settings.  And neither can I find the "build options" tab, even though I can find "Global Compiler Settings". I am using CB 10.05. Thank you.

stahta01:

--- Quote from: cbuser2 on October 13, 2012, 03:27:37 am ---
--- Quote from: stahta01 on October 13, 2012, 01:29:28 am ---Did you try just adding /usr/include/libxml2 to the include search path? ....

Under "Global Compiler Settings"
Tab "build options"
Try checking "Explicitly add current compiling file's directory ...."

--- End quote ---

I can't find the include search path option in the settings.  And neither can I find the "build options" tab, even though I can find "Global Compiler Settings". I am using CB 10.05. Thank you.



--- End quote ---

In 10.05 under Windows you need the "other setting" tab the far right tab use likely need to use arrows to get it it.

By 'include search path' I mean the compiler search directory setting.

Tim S.

cbuser2:
I believe that I've done everything that you've suggested, but still getting the error message. Very weird.



Navigation

[0] Message Index

[#] Next page

Go to full version