User forums > Using Code::Blocks

Can't add X11 to search directory

<< < (3/4) > >>

AzureZero:

--- Quote from: BlueHazzard on January 11, 2022, 10:02:24 pm ---....

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

--- End quote ---

Your not the only one that thinks this, or this is a strong beer bug.
Gotta keep a sense of humour with annoying programming issues.

I've dumped the results of the terminal into files attached to post.
One covering compiler the other the permissions of the X11 folder in /usr/include

BlueHazzard:
Looking at your files, confirms that "/usr/include" is in the default search path, so #including <X11/Xmu/WinUtil.h> should result in /usr/include/X11/Xmu/WinUtil.h

Ok ,i am somehow out of ideas:

I tried to reproduce your problem, the steps i did:
1) Set up fresh linux Mint
2)
--- Code: ---sudo apt-get install libx11-dev
--- End code ---
3)
--- Code: ---sudo apt-get install libxmu-dev
--- End code ---
4) Open codeblocks, create a c++ console project
5) paste
--- Code: ---#include <X11/Xmu/WinUtil.h>    // <-- Gives error
#include <X11/Xatom.h>
#include <X11/Xlib.h>           // <-- does Fine
--- End code ---
6) Hit compile

everything compiles fine...

i also added your include directories (beside the steam things) and still everything worked fine...

have you tried to call in your project folder

--- Code: ---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
--- End code ---
directly in console and look at the output?

Also you can try to call (note the added -v -E)

--- Code: ---g++ -v -E -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
--- End code ---
and look at the include directories if you can find something

Are you running in a linux on windows system, or native linux system?

AzureZero:
I tested with a NEW console project (Hello world) on my ZorinOS 16 Core Virtual Machine

only adding /usr/include in the search directories for Code::Blocks

and it fails on X11/Xmu/WinUtil.h

it sees other directories in the X11, but not the Xmu directory.
As I decided to manually re-type the include statement and the auto-fill did not list X11/Xmu
as I did not find it between Xmd.h and Xos.h

Yeah, this is a rare head scratcher of a problem.

--

Is there a way to get the IDE to run as Root, to test if it is a permission issue of some sort, or some other issue?

BlueHazzard:

--- Quote from: AzureZero on January 14, 2022, 04:51:44 pm ---Is there a way to get the IDE to run as Root, to test if it is a permission issue of some sort, or some other issue?

--- End quote ---

simply run codeblocks with "sudo codeblocks".

but then all created files will be owned by root.

Have you tried the commands i wrote? you can try them with root too.

AzureZero:
I've run those commands (sudo) when setting up codeblocks and even used Synaptic package manager to re-install them encase something was corrupted.

And I can't run CodeBlocks as sudo in the terminal

--- Code: ---ryos@ZorinVM:~$ sudo codeblocks
sudo: codeblocks: command not found

--- End code ---

Seems I must have a different version of code-blocks installed.

I'll try using the one from the Zorin repo using
--- Code: ---sudo apt-get install codeblocks
--- End code ---
and the console project works now.

So their is an Issue with one from the software centre, Version: 20.03, Updated: 2021-12-06,  sourced from dl.flathub.org.
While the apt-get one works.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version