Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Development / Re: Force X11 compatibility mode
« Last post by blauzahn on Yesterday at 03:00:32 pm »
With that patch, docking is fixed under Arch Linux Wayland as well, e.g. open-files-list dock.

Wonderful! Thank you.
2
Development / Re: Force X11 compatibility mode
« Last post by Miguel Gimenez on Yesterday at 10:53:40 am »
With this patch Aui docking works on Ubuntu 24.04/Wayland:

Code
Index: src/src/app.cpp
===================================================================
--- src/src/app.cpp (revision: 13846)
+++ src/src/app.cpp (copia de trabajo)
@@ -367,8 +367,19 @@
 
 } // namespace
 
-IMPLEMENT_APP(CodeBlocksApp) // TODO: This gives a "redundant declaration" warning, though I think it's false. Dig through macro and check.
+#ifdef __WXGTK__
+wxIMPLEMENT_APP_NO_MAIN(CodeBlocksApp);
 
+int main(int argc, char **argv)
+{
+    setenv("GDK_BACKEND", "x11", 1);
+    wxDISABLE_DEBUG_SUPPORT();
+    return wxEntry(argc, argv);
+}
+#else
+wxIMPLEMENT_APP(CodeBlocksApp);
+#endif
+
 BEGIN_EVENT_TABLE(CodeBlocksApp, wxApp)
     EVT_ACTIVATE_APP(CodeBlocksApp::OnAppActivate)
     EVT_TASKBAR_LEFT_DOWN(CodeBlocksApp::OnTBIconLeftDown)
3
Development / Force X11 compatibility mode
« Last post by Miguel Gimenez on May 22, 2026, 02:38:14 pm »
Currently most Linux distributions are removing X11 support forcing Wayland usage.

C::B relies heavily on Aui, and currently Aui does not work correctly with Wayland. Forcing XWayland, if it is available, would make Aui work again on these systems (this is the method used by KiCAD).

Adding these lines to OnInit() should be enough:

Code
#ifdef __WXGTK__
    wxSetEnv("GDK_BACKEND", "x11");
#endif

Opinions?

EDIT: The change does not work, while "GDK_BACKEND=x11 ./codeblocks" works. Looks like the variable must be set using setenv() just before the App object is created, i.e., before the call to wxEntry()

5
General (but related to Code::Blocks) / Re: CodeBlocks on Linux
« Last post by Miguel Gimenez on May 21, 2026, 01:19:27 pm »
The startup lock on Arch/Fedora is fixed in the current trunk (r13845), in fact Fedora's package has been updated (to Testing in 44 and Stable in Rawhide).

You do not need to mess with SVN, Sourceforge allows downloading a snapshot in ZIP format.

You can edit the Wiki page with your forum credentials (just open it while registered in the forum) and add your findings.
6
General (but related to Code::Blocks) / CodeBlocks on Linux
« Last post by Ender4rmy on May 21, 2026, 11:29:05 am »
Hello. I am new to this forum and only recently started using Code::Blocks, as it is needed for Vocational School. As I primarily use Linux I have had horrible experiences getting the IDE to work. This post should serve as Help on how I eventually did get it to work, and as a cry for help to fix the versions available on Linux. If not possible by the devs then hopefully by community members who are able and willing to fix those.

So what where the issues and how did I get it working?

The flatpak version, while working, does not come with any of the Contrib Plugins. Even installing the optional Plugins that are available to download via e.g. the Gnome Store didnt help. This wouldnt be that much of an issue, if my workflow wouildnt need the File Manager Plugin, which is a part of the Contrib Plugins.

The Distro Packagemanager Version has the issue that upon installing it and trying to start it, that it simply doesnt start and crash on startup. This seems to be a known issue because it was reported on the Arch Repository Site atleast 5 months ago. The issue stems from something to do with wxWidgets. Deleting files related to wxWidgets makes the crash not happen. Though even if it starts there is again the issue of the Contrib Plugins missing, with no way to install them afterwards(atleast to my knowledge and I couldnt even find a way to download JUST those contrib Plugins). While I mentioned the Arch Repository, this also seems to be an issue with the APT package manager, where wxWidgets causes the programm to crash on startup and the contrib Plugins not being installed.

The AUR Version has a seperate Issue entirely, and while none at Code::Blocks actually have an influence on that version, I do want to mention it in the hopes of someone being able to fix it, since I am currently unable to even create an AUR Account. The issue, from what I can tell, is that the make script of the AUR version seems to be looking for an outdated SVN Link. On the SVN Repo of CodeBlocks I also seem to notice that at some point the way the developers have previously released their sourcecode on SVN seems to have changed at some point.

So how did get it to work?

I got the sourcecode fresh from the SVN Repo, which was a struggle since not every Distro comes with a way to interact with SVN.
Depending on the distro all you would need to do is open the source folder inside the terminal, run ./bootstrap and then run "./configure --with-contrib-plugins=all
make -j$(nproc)
sudo make install"

What can happen is that you will get errors of specific packages not being installed that the make script needs to actually build CodeBlocks from sourcecode. If that happens just go through the error code and install those packages manually. For the Devs you could add a part to the BUILD instructions to atleast mention ALL the packages needed to make the build happen. I myself went through the headache of going through forum posts, and asking AI for help and clarification.
After doing that you should have a fully functioning, newest Version of Code::Blocks that comes with all Contrib Plugins installed and working.

There is another Issue I have come across. I recently switched from CachyOS(Arch Based) to PikaOS(debian sid based). When I wanted to reinstall Code::Blocks I remembered the official website actually does provide a download for Debian based systems. I downloaded it and ran a command to automatically install all .deb files in the current working directory of the terminal. It installed and when I tried to start it, it crashed again on startup. And what do you know? Inside the /usr/lib/codeblocks/plugins directory were 3 files from wxWidgets. Deleting those causes the crash to dissapear. This variant does also install the Contrib Plugins BUT for some reason, it wasnt able to build code. And running already built code comes with such a delay that it makes you question wether or not you actually pressed the run button.

This is everything I have encountered, trying to make Code::Blocks work on Linux. I hope this will help others in some way
7
Help / Re: Cannot find the compiler
« Last post by Miguel Gimenez on May 18, 2026, 01:57:17 pm »
Profile spammer reported to moderator.
8
Using Code::Blocks / How prevent unfold code at closed brackets.
« Last post by squad on May 09, 2026, 11:54:54 am »
It's a great IDE. Thanks. ;)

There's some folded code.
When I'm adding code before that folded section and accidentally type an right bracket(no left bracket, not closed.), all the folded code that follows gets expanded.
Is there any way to prevent this?
9
General (but related to Code::Blocks) / Re: Welcome Newcomers - PLEASE READ!!!
« Last post by squad on May 09, 2026, 11:47:08 am »
I am new, I am here. I am a human 8)
10
Help / Re: debugger_gdbmi
« Last post by Pecan on May 08, 2026, 04:28:25 pm »
Great work Pecan. Or in my words bloody good job (OZ).

One thing to remember is that testing is a killer and needs to be done using it against CB to fix bugs. It's a PITA an takes time.

The second thing to remember is no matter how good you think the debugger is there WILL be bugs slip through the corner cases or the homer effect (doh i did not check that or think to check that).

Overall I think in the short term this should go into the CB mainline to replace the existing GDB debugger as the existing GDB debugger uses the ancient and technically obsolete I/F.
But in the long term ..... move to the next one and save yourself the pain, unless ....... . At the end only you know the best way forward for yourself.

Good luck and keep up the great  work.

Thanks. I'm already working inside your DAP prototype.
It's a bitch. I hate that awful JSON parser.
I still don't understand what I have to do to define those To: and From: entries.
Praying to the code gods just does not work.

Even Gemini and Claude get confused and get it wrong.
But if I just try first (and always get it wrong) the robots can see how to fix it.
Pages: [1] 2 3 4 5 6 ... 10