User forums > Using Code::Blocks

Can't add X11 to search directory

<< < (2/4) > >>

Miguel Gimenez:

--- Quote ---I've tried adding the /usr/include/X11 folder to the search directory in the build options
--- End quote ---

Somehow you failed and ended adding /Include/ also (note the uppercase I). The second folder is OK.

Have you installed libxmu-dev? The error says this:


--- Quote ---No such file or directory #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
--- End quote ---

AzureZero:

--- Quote from: Miguel Gimenez on December 16, 2021, 05:08:35 pm ---
--- Quote ---I've tried adding the /usr/include/X11 folder to the search directory in the build options
--- End quote ---

Somehow you failed and ended adding /Include/ instead (note also the uppercase I). The second folder is OK.

Have you installed libxmu-dev? The error says this:


--- Quote ---No such file or directory #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
--- End quote ---

--- End quote ---

The the one after /Include/, is -I/usr/include in the log as I used the GUI to add the /usr/Include directory.
To get what I mean look at Images in the OP to see what I mean about /usr/include/X11, and Code::Blocks not seeing it.

And as I said in the second post, I did run sudo apt-get install libxmu-dev in the terminal to ensure X11/Xmu/WinUtil.h was installed.

BlueHazzard:
is X11/Xmu/WinUtil.h in your file system? Have you actually checked id the file is there? only running

--- Code: ---apt-get install libxmu-dev
--- End code ---
does not ensure that the file is there :)

can you run

--- Code: ---tree /usr/include > test.txt
--- End code ---
in a shell/bash in your home directory, zip the generated test.txt and post it here?

AzureZero:
Hey

Sorry for the delay, was busy with Christmas and some stuff in the New year
Yes, I checked that the file existed, and it does.

Here is the tree of /usr/include in the test file.

BlueHazzard:
Linux file system is case sensitive... Are the x in your includes the same case? They should be upper case according your tree output

have you tried to switch order of includes?
Have you checked the access rights to the Xmu folder?

it is not codeblocks that is giving you errors, but gcc...

can you run
--- Code: ---c++ -xc++ /dev/null -E -Wp,-v 2>&1 | sed -n 's,^ ,,p'
--- End code ---
in your console and post the result here?

This has to be some stupid error, where we all will head bang when it works...

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version