Recent Posts

Pages: 1 ... 3 4 5 6 7 [8] 9 10
71
Using Code::Blocks / Re: How to define a Variable value frome shell cmd
« Last post by ccdric on September 26, 2025, 09:52:32 am »
Thanks stahta01 :
it works halfway  :D
in CodeBlocks_project_file/Project/Build/Environment
add 2 variables :
Code
    <Variable name="PYBIND_INCLUDES" value="`python -m pybind11 --includes`" />
    <Variable name="PYBIND_EXTENTION" value="`python -m pybind11 --extension-suffix`" />
in CodeBlocks_project_file/Project/Build/Target/Compiler
add this :
Code
<Add option="$(PYBIND_INCLUDES)" />
(this is the half part that works fine  :) )

But here it doesn't works :( :
in CodeBlocks_project_file/Project/Build/Target/Option/@output
Code
 <Option output="bin/Debug/trie$(PYBIND_EXTENTION)" ... >

the var is literally copied in the link cmd :
Code
g++-13 -shared obj/Debug/src/mod1.o obj/Debug/src/mod2.o  -o "bin/Debug/libmylib`python -m pybind11 --extension-suffix`.so" -m64 
Perhaps there is a better way for that second part ?

(I try ton compile c++ lib for use it in python. It's new for me. I 'll hive probably other question how to parameterize C::B to fit in python env)
72
Help / Re: code::blocks hangs at startup
« Last post by ollydbg on September 26, 2025, 09:18:34 am »
I don't see the hang issue when I build the C::B under the msys2/mingw64, but I see a crash when C::B load a wxWidgets project, and after I try to open a wxs wxsmith file.

See the call stack here:

Code
[debug]> frame 4
[debug]#4  0x00007ff8ad97d270 in wxPGProperty::GetValueAsString (this=0x11daa950, flags=0) at F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427
[debug]F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427:53089:beg:0x7ff8ad97d270
[debug]>>>>>>cb_gdb:

#4  0x00007ff8ad97d270 in wxPGProperty::GetValueAsString (this=0x11daa950, flags=0) at F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427
F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427:53089:beg:0x7ff8ad97d270
At F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427

[debug]> show language
[debug]The current source language is "auto; currently c++".
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0  0x00007ff8d4ca71b1 in wxDefaultAssertHandler(wxString const&, int, wxString const&, wxString const&, wxString const&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#1  0x00007ff8d4ca49ec in wxOnAssert(char const*, int, char const*, char const*, wxString const&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#2  0x00007ff8d534b68e in wxPGProperty::ValueToStringWithCheck(wxVariant&, wxPGPropValFormatFlags) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#3  0x00007ff8d534f73e in wxPGProperty::GetValueAsString(wxPGPropValFormatFlags) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#4  0x00007ff8ad97d270 in wxPGProperty::GetValueAsString (this=0x11daa950, flags=0) at F:\code\wxWidgets-3.3.1\include\wx\propgrid\property.h:1427
[debug]#5  0x00007ff8d534c06e in wxPGProperty::GetValueAsStringWithCheck(wxPGPropValFormatFlags) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#6  0x00007ff8d53521ca in wxPGProperty::GetDisplayInfo(unsigned int, int, int, wxString*, wxPGCell*) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#7  0x00007ff8d53545b2 in wxPGDefaultRenderer::Render(wxDC&, wxRect const&, wxPropertyGrid const*, wxPGProperty*, int, int, int) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#8  0x00007ff8d535de13 in wxPropertyGrid::DoDrawItems(wxDC&, wxRect const*) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#9  0x00007ff8d535efae in wxPropertyGrid::DrawItems(wxDC&, unsigned int, unsigned int, wxRect const*) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#10 0x00007ff8d536bf78 in wxPropertyGrid::OnPaint(wxPaintEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#11 0x00007ff8d4ca3467 in wxAppConsoleBase::CallEventHandler(wxEvtHandler*, wxEventFunctor&, wxEvent&) const () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#12 0x00007ff8d4deff55 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#13 0x00007ff8d4df28b3 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#14 0x00007ff8d4df2916 in wxEvtHandler::TryHereOnly(wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#15 0x00007ff8d4df2983 in wxEvtHandler::ProcessEventLocally(wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#16 0x00007ff8d4df2a61 in wxEvtHandler::ProcessEvent(wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#17 0x00007ff8d512453f in wxScrollHelperEvtHandler::ProcessEvent(wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#18 0x00007ff8d4df0262 in wxEvtHandler::SafelyProcessEvent(wxEvent&) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#19 0x00007ff8d4ed7dbb in wxWindow::HandlePaint() () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#20 0x00007ff8d4eda158 in wxWindow::MSWHandleMessage(long long*, unsigned int, unsigned long long, long long) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#21 0x00007ff8d4ec573c in wxWindow::MSWWindowProc(unsigned int, unsigned long long, long long) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#22 0x00007ff8d58f03ac in wxScrolled<wxControl>::MSWWindowProc(unsigned int, unsigned long long, long long) () from F:\code\wxWidgets-3.3.1\lib\gcc_dll\wxmsw331u_gcc_custom.dll
[debug]#23 0x00007ff963c1ef5c in USER32!CallWindowProcW () from C:\WINDOWS\System32\user32.dll
[debug]#24 0x00007ff963c1e8cc in USER32!DispatchMessageW () from C:\WINDOWS\System32\user32.dll
[debug]#25 0x00007ff963c310c3 in USER32!SendMessageTimeoutW () from C:\WINDOWS\System32\user32.dll
[debug]#26 0x00007ff9657f1374 in ntdll!KiUserCallbackDispatcher () from C:\WINDOWS\SYSTEM32\ntdll.dll
[debug]#27 0x00007ff9634a2be4 in win32u!NtUserRealInternalGetMessage () from C:\WINDOWS\System32\win32u.dll
[debug]#28 0x00007ff934b9d559 in GetMessageExA () from C:\WINDOWS\SYSTEM32\duser.dll
[debug]#29 0x00007ff934b9d348 in GetMessageExA () from C:\WINDOWS\SYSTEM32\duser.dll
[debug](More stack frames follow...)

Strange that it does not contains function calls from C::B's source code, maybe, "More stack frames follow...)


EDIT:

In the crash, I see that:

Code
    virtual wxString GetValueAsString(int flags) const
    {
        m_oldGetValueAsString = true;
        return GetValueAsString(static_cast<wxPGPropValFormatFlags>(flags));
    }

the flags is 0.
73
Help / Re: code::blocks hangs at startup
« Last post by stahta01 on September 25, 2025, 10:31:39 pm »
wxSmith is the only plugin still using PNG, every other plugins are now using SVG. Maybe glycin has problems loading these PNG, but booting in safe mode should work.

Thank you for that info; I have been having issues building/runtime with wxWidgets 3.3.x and the wxSmith plugin under MSys2 MINGW64 and now I have a possible cause to look into. wxWidgets 3.2.8 was working okay.
Edit: The issue is only seen when three things is true: wxWidgets 3.3.x, MINGW64, and wxSmith plugin is built; UCRT64 and MINGW32 do not have the problem for example. I can now see if an wxWidgets sample has the problem that uses PNG images.

Tim S.
74
Help / Re: code::blocks hangs at startup (solved for now)
« Last post by blauzahn on September 25, 2025, 07:57:24 pm »
cb works again when the zip-files of the three wxsmith plugins are deleted. Alternatively, disabling them when calling configure (not cmake) works as well as expected.

Obviously, wxSmith can not be used in that case.

Thanks again for the help.
75
Using Code::Blocks / Re: How to switch between files in Code::Blocks editor window
« Last post by blauzahn on September 25, 2025, 06:52:14 pm »
Quote
Yes, but the problem is I want to hop back to where I was a couple of minutes ago, and I have to figure out what file that was!

Please have a look at the Browse Tracker plugin. I do not use it myself but here is the wiki page:

https://wiki.codeblocks.org/index.php/Browse_Tracker_plugin

76
Using Code::Blocks / Re: How to define a Variable value frome shell cmd
« Last post by stahta01 on September 25, 2025, 02:40:34 pm »
The tilted tic does that in places in CB   [`]  the tic between the square brackets.
Edit you need one at both the start and end of the command.
Edit2: I have never used it to define a variable; so, not sure where all it works.
I have used it in both compiler and linker extra setting.

Tim S.
77
Using Code::Blocks / Re: How to switch between files in Code::Blocks editor window
« Last post by ccdric on September 25, 2025, 02:06:28 pm »
[
  • If I try to drag the second file's tab at the top of the C::B editor window, as soon as I click on it I move to that file instead of being able to drag it.
 


I'm no sure I understand very well (I'm not natural English speaking)
but for me I can move the editor tab if the tab is the selected one, if not it just select it.
just move it on the right border slowly until a blue "ghost" windows appears in the center of the editor,  then release it. it should do what I understand you wants.

78
Using Code::Blocks / Re: Moving Watches window
« Last post by FrankPeelo on September 25, 2025, 01:45:12 pm »
On my machine, the watch window was docket at the bottom of the screen.

I clicked on the word "Watches" at the top of the watch window. The bar across the top of the window went blue. Then I was able to drag it out and drop it in the middle of my screen.

Next I drag the same "Watches" top bar to the top of my editor window, i.e. to the top of the code. The top of the editor window gets shaded blue. Then I can drop it there and it is over the code.

That's "over" in the sense of "above it on the screen". I didn't find a way to make it cover all the source code. But I would think you need to be able to see the source code to know where you are debugging.
79
Using Code::Blocks / Re: How to switch between files in Code::Blocks editor window
« Last post by FrankPeelo on September 25, 2025, 01:36:38 pm »
The tabs on top or bottom of the editor window fill up available space quickly but navigating via the open file list works well for me even when I have dozens of files opened.

Yes, but the problem is I want to hop back to where I was a couple of minutes ago, and I have to figure out what file that was!

I have Settings | Environment... | Notebooks appearance -> Use stacked based tab-switching checked, and I was hoping ctrl-tab would bring me back to where I came from.

After posting the question yesterday I found a nice key binding, "Goto declaration", which is brilliant, got to the right header file in a completely different class. But then I was trying to remember where I was before and why I wanted to look up that function -- Bit like sometimes these days when I go upstairs, I'm wondering what I went up for...

80
Using Code::Blocks / Re: How to switch between files in Code::Blocks editor window
« Last post by FrankPeelo on September 25, 2025, 01:19:30 pm »
Swap header / source    F11

see https://wiki.codeblocks.org/index.php/Keyboard_Shortcuts

It is one of my favourite nifty little features of Code::Blocks besides F2 for opening/closing the log info pane.

Thanks, the link is now bookmarked. It does say ctrl-tab should cycle through recent files, it's provided by the Code::Blocks' editor component and cannot be rebound. But it doesn't work on my machine, which is a pity.

The "Swap header / source" function is great though, I now have a key bound to that, and it's a big help.

Thanks

Frank
Pages: 1 ... 3 4 5 6 7 [8] 9 10