Recent Posts

Pages: [1] 2 3 4 5 6 ... 10
1
Using Code::Blocks / Re: UI : how to close all sub program at once ?
« Last post by Miguel Gimenez on Yesterday at 04:40:53 pm »
Look at Edit -> Folding and Settings -> Editor -> Folding.

You can add shortcuts using Settings -> Editor -> Keyboard shortcuts
2
Using Code::Blocks / UI : how to close all sub program at once ?
« Last post by Mandrake8790 on Yesterday at 03:58:50 pm »
Hi,

I want to close at once all the sub programs.
Does it exist a shortcut or an item menu to do that ?

User case (see picture) :
i open several sub programs, so there are a lot of minus signs inside squares.
i want to close them all at once => the result : there are only plus signs

Thanks
3
General (but related to Code::Blocks) / Re: I just start learning C++
« Last post by stahta01 on Yesterday at 01:07:10 pm »
Website rules basically Code::Blocks questions are okay; but, programming how to is off topic (OT).

https://forums.codeblocks.org/index.php/topic,9996.0.html
4
General (but related to Code::Blocks) / I just start learning C++
« Last post by Hortudy on Yesterday at 09:42:20 am »
Hello,

I'm a newcomer just learning C++ and Code::block seems to be a good soft to learn.

My mane goal is too develop audio plugins, this is why I choose to lear C++.
5
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by Pecan on June 22, 2025, 10:00:25 pm »
Hi Pecan,

thank you for the effort.

With the last patch (svn13671 BrowseTracker Move ... ) I get a compile error when building on Linux with make. An include is missing:
Code
#include <logmanager.h>
I don't understand this, logmanager.h is an sdk header, not a BrowseTracker header. It's included in trunk\src\include\Makefile.am Should my include statement use quotes instead of <> brackets?

Quote
When scrolling very briefly through the diff I noticed a function with a suspiciously empty if statement. It looks like unintentional semantics:

Code
void JumpTracker::OnLeftUp(wxMouseEvent& event) {
    if (m_leftDown && (not m_isDragging)) {
        // Pure click (no drag) occurred
    }
    m_leftDown = m_isDragging = false;
    event.Skip();
}
I had removed some old code. I added a comment to make it clearer. But cppcheck won't like it anyway.

Rant: I have never gotten cppcheck to work reliably. It spews out vast amounts of error or warning messages even when the compiler or clangd does not.

Quote
When I run CppCheck over the BrowseTracker cb-project, I get several warnings. E.g.:
Quote
BrowseTrackerLayout.cpp:173:41: warning: Either the condition 'cursor' is redundant or there is possible null pointer dereference: cursor. [nullPointerRedundantCheck]
            TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
                                        ^
BrowseTrackerLayout.cpp:155:17: note: Assuming that condition 'cursor' is not redundant
            if (cursor)
                ^
BrowseTrackerLayout.cpp:173:41: note: Null pointer dereference
            TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
                                        ^

or
Quote
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_pBrowseTracker' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_menuID' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownCode' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownMods' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^

Besides other warnings.

Since the topic-starter observed a crash, these should be fixed.

Have a nice day.

Those variables were actually initialized, but the code got smushed without white space so that cppcheck didn't recognize it.
I re-formated it to cppcheck taste.

I've changed the "cursor" statement to guard against use of a nullptr. Thanks.

Thanks for looking at this.
6
Using Code::Blocks / Re: CB 25.02 - BrowseTracker crash on startup
« Last post by blauzahn on June 22, 2025, 10:29:25 am »
Hi Pecan,

thank you for the effort.

With the last patch (svn13671 BrowseTracker Move ... ) I get a compile error when building on Linux with make. An include is missing:
Code
#include <logmanager.h>

When scrolling very briefly through the diff I noticed a function with a suspiciously empty if statement. It looks like unintentional semantics:

Code
void JumpTracker::OnLeftUp(wxMouseEvent& event) {
    if (m_leftDown && (not m_isDragging)) {
        // Pure click (no drag) occurred
    }
    m_leftDown = m_isDragging = false;
    event.Skip();
}

When I run CppCheck over the BrowseTracker cb-project, I get several warnings. E.g.:
Quote
BrowseTrackerLayout.cpp:173:41: warning: Either the condition 'cursor' is redundant or there is possible null pointer dereference: cursor. [nullPointerRedundantCheck]
            TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
                                        ^
BrowseTrackerLayout.cpp:155:17: note: Assuming that condition 'cursor' is not redundant
            if (cursor)
                ^
BrowseTrackerLayout.cpp:173:41: note: Null pointer dereference
            TiXmlElement* browsemarks = cursor->NextSiblingElement("BrowseMarks");
                                        ^

or
Quote
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_pBrowseTracker' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_menuID' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownCode' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^
BrowseSelector.cpp:93:17: warning: Member variable 'BrowseSelector::m_KeyDownMods' is not initialized in the constructor. Member variables of native types, pointers, or references are left uninitialized when the class is instantiated. That may cause bugs or undefined behavior. [uninitMemberVarPrivate]
BrowseSelector::BrowseSelector()
                ^

Besides other warnings.

Since the topic-starter observed a crash, these should be fixed.

Have a nice day.
7
Help / Re: Debugging problem in a console application with ncurses library
« Last post by Bug Killer on June 21, 2025, 03:25:31 pm »
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.
8
Help / Re: Debugging problem in a console application with ncurses library
« Last post by Krice on June 21, 2025, 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.
9
Help / Re: Debugging problem in a console application with ncurses library
« Last post by Bug Killer on June 21, 2025, 12:25:09 pm »
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)
10
Help / Binary releases page has broken sourceforge links
« Last post by NooneAtAll3 on June 21, 2025, 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
Pages: [1] 2 3 4 5 6 ... 10