User forums > Using Code::Blocks

Can't add X11 to search directory

(1/4) > >>

AzureZero:
Hello

First time user and poster for Code Blocks IDE.

I'm having an issue with X11/Xmu/WinUtil.h in that Code Blocks can't see it and as get the error:
../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/framework.h|43|fatal error: X11/Xmu/WinUtil.h: No such file or directory
when I attempt to build or compile.

Now I've tried adding the /usr/include/X11 folder to the search directory in the build options of the project, but for some reason it can't see it.
And I know I have the X11/Xmu/WinUtil.h header in the /usr/include/ folder from the file explorer

I have attached screenshots of the IDE's directory search and my OS's file explorer as proof of this issue as X11 is one folder Code Blocks can't seem to see.

It would help if I knew what was wrong, or if I'm thinking about the solution in the wrong way.

BlueHazzard:
Can you please post the full rebuild log like described here:
https://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

AzureZero:
I am running Code::Blocks version Code::Blocks 20.03 on Zorin OS 16 Core.
The compiler I use is GNU GCC Compiler
version gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04).

When I import a VS code sample project using a 3rd Party SDK (Ultra App Kit) and added in the needed include folder in the directory search for the 3rd Party SDK everything seems fine.
Until I go to build / Compile where it asks for X11/Xmu/WinUtil.h, which is in the usr/include/ folder on the system.
The header file asking with the line; #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
is part of the 3rd Party SDK, and yes, I ran sudo apt-get install libxmu-dev to make sure it was installed.

Though now that I look at the order of includes in that file something seems a bit weird.
As just above the line with an error is; include <X11/Xlib.h>           // `apt-get install libx11-dev`
so is Code::Blocks not doing a recursive check in the /usr/include/X11 folder?
Or do I need to rebuild a certain file somewhere so the compiler can more easily see it?


Build log:

--- Code: ----------------- Clean: Debug x64 in Testing (compiler: GNU GCC Compiler)---------------

Cleaned "Testing - Debug x64"

-------------- Build: Debug x64 in Testing (compiler: GNU GCC Compiler)---------------

g++ -lX11 -Wall -g -O0 -D_ULTRA_APPKIT -D_DEBUG -I/Include/ -I"../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include" -c "/home/ryos/Documents/Ultra Engine/Projects/Testing/Source/main.cpp" -o Debug/Source/main.o
g++ -lX11 -Wall -g -O0 -D_ULTRA_APPKIT -D_DEBUG -I/Include/ -I"../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include" -c "/home/ryos/Documents/Ultra Engine/Projects/Testing/Source/UltraEngine.cpp" -o Debug/Source/UltraEngine.o
In file included from ../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/UltraEngine.h:42,
                 from /home/ryos/Documents/Ultra Engine/Projects/Testing/Source/main.cpp:1:
../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/framework.h:43:18: fatal error: X11/Xmu/WinUtil.h: No such file or directory
   43 |         #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
      |                  ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
 
In file included from ../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/UltraEngine.h:42,
                 from /home/ryos/Documents/Ultra Engine/Projects/Testing/Source/UltraEngine.cpp:1:
../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/framework.h:43:18: fatal error: X11/Xmu/WinUtil.h: No such file or directory
   43 |         #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
      |                  ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End code ---


I've tried to get the IDE to include usr/include/X11 in the search directory list and it can't see the X11 folder in the usr/include/ location.
I have a tried Looking for a VC++ compiler since I am importing a VS code sample project even loading the mingw compiler.

Miguel Gimenez:
This part

--- Code: ----I/Include/
--- End code ---
is not correct, it should look something similar to this

--- Code: ----I/usr/include
--- End code ---

Look in the project's search folders for the error

AzureZero:
I gave that a shot and got the same error.

It is like as I mentioned in the OP, Code::Blocks can not seem to see the X11 folder when doing the directory search, and in the second post noted something weird.

As the file that has the issue is like this:

--- Code: --- ....
#include <X11/Xlib.h>           // <-- does Fine
#include <X11/Xmu/WinUtil.h>    // <-- Gives error
#include <X11/Xatom.h>
...

--- End code ---

How can X11/Xlib.h be fine, but X11/Xmu/WinUtil.h not be?

Here's the Build Log:

--- Code: ----------------- Clean: Debug x64 in Testing (compiler: GNU GCC Compiler)---------------

Cleaned "Testing - Debug x64"

-------------- Build: Debug x64 in Testing (compiler: GNU GCC Compiler)---------------

g++ -lX11 -Wall -g -O0 -D_ULTRA_APPKIT -D_DEBUG -I/Include/ -I/usr/include -I"../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include" -c "/home/ryos/Documents/Ultra Engine/Projects/Testing/Source/main.cpp" -o Debug/Source/main.o
g++ -lX11 -Wall -g -O0 -D_ULTRA_APPKIT -D_DEBUG -I/Include/ -I/usr/include -I"../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include" -c "/home/ryos/Documents/Ultra Engine/Projects/Testing/Source/UltraEngine.cpp" -o Debug/Source/UltraEngine.o
In file included from ../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/UltraEngine.h:42,
                 from /home/ryos/Documents/Ultra Engine/Projects/Testing/Source/main.cpp:1:
../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/framework.h:43:18: fatal error: X11/Xmu/WinUtil.h: No such file or directory
   43 |         #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
      |                  ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
In file included from ../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/UltraEngine.h:42,
                 from /home/ryos/Documents/Ultra Engine/Projects/Testing/Source/UltraEngine.cpp:1:
../../../../.steam/debian-installation/steamapps/common/Ultra App Kit/Include/framework.h:43:18: fatal error: X11/Xmu/WinUtil.h: No such file or directory
   43 |         #include <X11/Xmu/WinUtil.h>    // `apt-get install libxmu-dev
      |                  ^~~~~~~~~~~~~~~~~~~
compilation terminated.
Process terminated with status 1 (0 minute(s), 0 second(s))
2 error(s), 0 warning(s) (0 minute(s), 0 second(s))

--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version