Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
It appears that by default C::B runs a console application in a xterm terminal. If xterm is not installed the program is not displayed.

Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /home/cdf24/Documents/CodeBlocks/nctest/
Adding source dir: /home/cdf24/Documents/CodeBlocks/nctest/
Adding file: /home/cdf24/Documents/CodeBlocks/nctest/bin/Debug/nctest
Changing directory to: /home/cdf24/Documents/CodeBlocks/nctest/.
Set variable: LD_LIBRARY_PATH=.:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet  -args /home/cdf24/Documents/CodeBlocks/nctest/bin/Debug/nctest
Setting SHELL to '/bin/sh'
done
Setting breakpoints
Failed to execute terminal command: 'xterm -T 'Program Console' -e sleep 80012477' (exit code: -1)
Debugger name and version: GNU gdb (AlmaLinux) 14.2-4.el9
At /home/cdf24/Documents/CodeBlocks/nctest/main.cpp:9
Continuing...

You can change the default terminal for gnome-terminal in the drop list.

The message "warning: GDB: Failed to set controlling terminal: Operation not permitted" can be safely ignored.
2
Help / Re: Debugging problem in a console application with ncurses library
« Last post by Krice on Today at 12:48:31 pm »
It's even easier if you run gdb from the command line, but you need to copy data files etc. to where the executable file is, if it needs them (or set the working directory from gdb I guess). I can run gdb from command line and debug the program that way, I'm just wondering if it's even possible to debug ncurses programs within Code::Blocks. It has to be some kind of gdb issue, because running without gdb works. It's a mess. I don't know why TERM=xterm removes the error message when running, but doesn't show the executable's console window.
3
The best way I know to debug a ncurses program is to start it with gdbserver then debug it with gdb as a remote target. So, I have the ncurses program on a terminal and debuging on another.

First terminal :

Code
$ gdbserver myprogram localhost:1234
Second temminal :

Code
$ gdb -tui myprogram
(gdb) target remote localhost:1234
(gdb)
4
Help / Binary releases page has broken sourceforge links
« Last post by NooneAtAll3 on Today at 05:07:25 am »
Check what links are at https://www.codeblocks.org/downloads/binaries/

Non-exe options link to correct file name, but incorrect file extension (e.g. https: ... /codeblocks-25.03mingw-nosetup.exe)

Following such incorrect link results in project's sourceforge page with "pop-up" error about not finding that file

Changing the link to "...-nosetup.zip" fixes the issue
5
Dunno if this should go into Help subforum, but this isn't about C::B, but about this forum

Registration asks "digits of last year in reverse order", but it did not accept previous year when I tried - accepting current year instead
6
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by Pecan on Yesterday at 06:14:43 pm »
I cannot reproduce this problem.

Is this actually on Windows 10?
Please tell us the OS your using, and exactly how you installed CodeBlocks on that system so I can try to re-produce the steps that caused the error.

SideNote: both Addr2Line and (gdb) Info Line show "No statements found" at the BrowseTracker addresses from the crash report. And spending 4 hours trying to guess where in OnAttached() this occured produced no results.
7
Help / Re: Debugging problem in a console application with ncurses library
« Last post by Krice on Yesterday at 12:38:08 pm »
It seems like you need to add envinronment variable for (any) IDE which is TERM=xterm so I did that (Settings-environment-environment variables) and now the debugger runs, but it doesn't open a terminal window of the program, it's like the program just runs in the background somewhere (alt+tab doesn't show it either). Someone had fixed this in Eclipse by enabling "Use external console for inferior (open a new console window for input/output)". Is this possible in Code::Blocks, to open an "external" console window?
8
Help / Re: Cppcheck settings?
« Last post by Krice on Yesterday at 12:07:51 pm »
You can add these flags in settings|environment|CppCheck/Vera++|CppCheck arguments.

Right, the settings were there.. I tried to find it from Editor settings. Thanks, now it works.
9
Help / Re: Codeblocks not working on macos sonoma
« Last post by Miguel Gimenez on Yesterday at 10:12:27 am »
Disable the CodeCompletion plugin (rename CodeCompletion.dylib). You can later enable the new Clangd_client plugin.

The problem is in ClassBrowser::SetParser(), may be you can debug this (we do not have access to Macs).
10
Help / Re: Codeblocks not working on macos sonoma
« Last post by vwdvaan on Yesterday at 06:18:42 am »
Same here on Sonoma 14.7.2.
I compiled myself wxWidgets-3.2.8.1 and CodeBlocks-25.04 but it's crashes after i open CodeBlocks:
Code
<?xml version="1.0" encoding="UTF-8"?>
<report version="1.0" kind="exception">
  <system description="macOS Sonoma Version 14.7.2 (Build 23H311)"/>
  <stack>
    <frame level="0" function="wxFatalSignalHandler(int)" offset="0" address="0x10852f0ac"/>
    <frame level="1" function="_sigtramp" offset="0" address="0x7ff80638dfdd"/>
    <frame level="2" function="_sigtramp" offset="0" address="0x7ff7b8cb5e88"/>
    <frame level="3" function="ClassBrowser::SetParser(ParserBase*)" offset="0" address="0x117d74f7c"/>
    <frame level="4" function="ParseManager::CreateClassBrowser()" offset="0" address="0x117df6b72"/>
    <frame level="5" function="CodeCompletion::OnAttach()" offset="0" address="0x117d97c39"/>
    <frame level="6" function="cbPlugin::Attach()" offset="0" address="0x10883ee1c"/>
    <frame level="7" function="PluginManager::AttachPlugin(cbPlugin*, bool)" offset="0" address="0x1089a06ca"/>
    <frame level="8" function="PluginManager::LoadAllPlugins()" offset="0" address="0x1089a734d"/>
    <frame level="9" function="MainFrame::ScanForPlugins()" offset="0" address="0x107309f0a"/>
    <frame level="10" function="MainFrame::MainFrame(wxWindow*)" offset="0" address="0x1073048e3"/>
    <frame level="11" function="MainFrame::MainFrame(wxWindow*)" offset="0" address="0x10730cc7d"/>
    <frame level="12" function="CodeBlocksApp::InitFrame()" offset="0" address="0x10724a3b1"/>
    <frame level="13" function="CodeBlocksApp::OnInit()" offset="0" address="0x10724c791"/>
    <frame level="14" function="wxApp::CallOnInit()" offset="0" address="0x109b05480"/>
    <frame level="15" function="wxEntry(int&amp;, wchar_t**)" offset="0" address="0x1084abbe1"/>
    <frame level="16" function="main" offset="0" address="0x107248a43"/>
    <frame level="17" function="start" offset="0" address="0x7ff805fd3345"/>
  </stack>
</report>

Pages: [1] 2 3 4 5 6 ... 10