Recent Posts

Pages: 1 2 3 [4] 5 6 7 8 9 10
Hi. I am a literal noob when it comes to code::blocks so please feel free to move my post elsewhere (tell me where?).
All I want to know is, why is my file not saving when I try and save it. I have a YouTube video here explaining my problem within 90 seconds.

My code is very basic, it is this

#include <stdio.h>
#include <stdlib.h>

int main()
    printf("There once was a man named Paul\n");
    printf("He was 66 years old\n");
    printf("He really liked the name Paul\n");
    printf("He did not like being 66\n");
    return 0;

Yet instead, it brings up my old code and will not save or therefore run, this new one. Can anyone help?

Thank you so much in advance.
Help / Re: wxsmith crashes while dragging
« Last post by Miguel Gimenez on November 28, 2023, 10:05:55 am »
0xaaaaaaaaaaaaaaaa means that the code has accesed freed memory, but I can not see where this may happen. This is the relevant code:
void wxsItemEditorContent::OnMouse(wxMouseEvent& event)
    // Anti-recursion lock
    static bool IsRunning = false;
    if ( IsRunning ) return;
    IsRunning = true;

    if ( event.ButtonDown() )
    else if ( m_MouseState == msWaitForIdle )
        m_MouseState = msIdle;

    int NewX = event.m_x;
    int NewY = event.m_y;
    event.m_x = NewX;
    event.m_y = NewY;
    switch ( m_MouseState )
        case msDraggingPointInit: OnMouseDraggingPointInit (event); break;
        case msDraggingPoint:     OnMouseDraggingPoint     (event); break;
        case msDraggingItemInit:  OnMouseDraggingItemInit  (event); break;
        case msDraggingItem:      OnMouseDraggingItem      (event); break;
        case msTargetSearch:      OnMouseTargetSearch      (event); break;
        case msWaitForIdle:                                         break;
        case msIdle: // fall-through
        default:                  OnMouseIdle              (event); break;

    IsRunning = false;
EDIT: Cannot reproduce on MSW, may be MacOS-specific.
Using Code::Blocks / Re: Help, my EXE won't work cuz' of missing libstdc++-6.dll
« Last post by takenumeral on November 28, 2023, 04:18:28 am »
Did you try to copy the needed DLLs from the compiler installation likely from inside the bin folder?
Help / wxsmith crashes while dragging
« Last post by rartigas on November 27, 2023, 10:40:06 pm »

I have a consistent crash when moving objects on the WxSmith editor. I created a simple project using WxWidgets version 3.2, with WxSmith Frame Based. After adding a couple of objects (a couple of Button) onto the Form, and while dragging them to re-position, Codeblocks crashes with the following message:

artigas@McBoock codeblocks_dbgrpt-23210-20231127T222916 % cat codeblocks.xml
<?xml version="1.0" encoding="UTF-8"?>
<report version="1.0" kind="exception">
  <system description="macOS Ventura Version 13.6 (Build 22G120)"/>
    <frame level="0" function="wxFatalSignalHandler(int)" offset="0" address="0x1033c8c5c"/>
    <frame level="1" function="_sigtramp" offset="0" address="0x7ff80927d5ed"/>
    <frame level="2" function="_sigtramp" offset="0" address="0xaaaaaaaaaaaaaaaa"/>
    <frame level="3" function="wxsItemEditorContent::OnMouse(wxMouseEvent&amp;)" offset="0" address="0x110e8c1f5"/>
    <frame level="4" function="wxEventHashTable::HandleEvent(wxEvent&amp;, wxEvtHandler*)" offset="0" address="0x1033d17af"/>
    <frame level="5" function="wxEvtHandler::ProcessEventLocally(wxEvent&amp;)" offset="0" address="0x1033d24ca"/>
    <frame level="6" function="wxEvtHandler::ProcessEvent(wxEvent&amp;)" offset="0" address="0x1033d23c0"/>
    <frame level="7" function="wxScrollHelperEvtHandler::ProcessEvent(wxEvent&amp;)" offset="0" address="0x104b37c52"/>
    <frame level="8" function="wxEvtHandler::SafelyProcessEvent(wxEvent&amp;)" offset="0" address="0x1033d28dc"/>
    <frame level="9" function="wxWidgetCocoaImpl::DoHandleMouseEvent(NSEvent*)" offset="0" address="0x1049ece19"/>
    <frame level="10" function="wxWidgetCocoaImpl::mouseEvent(NSEvent*, NSView*, void*)" offset="0" address="0x1049e7720"/>
    <frame level="11" function="-[NSWindow _handleMouseDraggedEvent:]" offset="0" address="0x7ff80cd03c4b"/>
    <frame level="12" function="-[NSWindow(NSEventRouting) _reallySendEvent:isDelayedEvent:]" offset="0" address="0x7ff80c52982b"/>
    <frame level="13" function="-[NSWindow(NSEventRouting) sendEvent:]" offset="0" address="0x7ff80c529427"/>
    <frame level="14" function="-[wxNSWindow sendEvent:]" offset="0" address="0x1049d284b"/>
    <frame level="15" function="-[NSApplication(NSEvent) sendEvent:]" offset="0" address="0x7ff80c527e01"/>
    <frame level="16" function="-[wxNSApplication sendEvent:]" offset="0" address="0x104920472"/>
    <frame level="17" function="-[NSApplication _handleEvent:]" offset="0" address="0x7ff80c7e274e"/>
    <frame level="18" function="-[NSApplication run]" offset="0" address="0x7ff80c3b77ad"/>
    <frame level="19" function="wxGUIEventLoop::OSXDoRun()" offset="0" address="0x1049c8cba"/>
    <frame level="20" function="wxCFEventLoop::DoRun()" offset="0" address="0x1033b1c0d"/>
    <frame level="21" function="wxEventLoopBase::Run()" offset="0" address="0x10330fdd5"/>
    <frame level="22" function="wxAppConsoleBase::MainLoop()" offset="0" address="0x1032e74b4"/>
    <frame level="23" function="wxApp::OnRun()" offset="0" address="0x10496285a"/>
    <frame level="24" function="CodeBlocksApp::OnRun()" offset="0" address="0x10258af0b"/>
    <frame level="25" function="wxEntry(int&amp;, wchar_t**)" offset="0" address="0x1033412e9"/>
    <frame level="26" function="main" offset="0" address="0x102581fb3"/>
    <frame level="27" function="start" offset="0" address="0x7ff808ef641f"/>

I'm using the following configuration:

 OS: Mac OS Ventura
Codeblocks 20.03 from Xaviou, rev13394
WxWidgets version 3.2

I also tried other compilations but all them fail at the same point, while other do only show a Black screen on the WxSmith editor. What is works is editing the (X,Y) position of the object without any crash.

Thanks for any help or workarround.
Nightly builds / Re: The 19 November 2023 build (13398) is out.
« Last post by Bug Killer on November 27, 2023, 09:18:01 pm »
RPMs of Code::Blocks svn13399 with all contrib plugins, wxWidgets 3.2.4 and wxSQLite3 for RHEL 8 and 9 are available from my repository.

To update from previous RPMs :

$ sudo dnf clean all
$ sudo dnf update
Development / Re: C::B dark mode in Windows
« Last post by gd_on on November 27, 2023, 06:47:25 pm »
Reading your modifications in C::B code, I think you should guard them at least in  wxscolourproperty.cpp :
#if wxCHECK_VERSION(3, 3, 0)
#endif // wxCHECK_VERSION
because the value is not the same in wxWidgets 3.2.3 (or 3.2.4), and with those previous official wxWidgets versions, the compiler has no problems to find it in propgrid.h. I have until now no idea why this value is not found correctly with wxWidgets 3.3.0.

May be you can also guard inclusion of wx/hashmap.h in wxsitemeditorcontent.h, but it's probably not very useful.
#if wxCHECK_VERSION(3, 3, 0)
    #include <wx/hashmap.h>
#endif // wxCHECK_VERSION

Using Code::Blocks / Re: Using a file dialog with wxSmith?
« Last post by Miguel Gimenez on November 27, 2023, 06:40:21 pm »
You said you are using wxsmith. Did you add a wxFileDialog to your frame/dialog?.

If you want to add one, open wxSmith, go to the Dialogs tab and select wxFilleDialog (the third from the left).
Using Code::Blocks / Re: Using a file dialog with wxSmith?
« Last post by Sephiroth on November 27, 2023, 06:34:04 pm »
I am not seeing "wxFileDialog" on the completion popup in CB, so I am not sure but I do not believe it is working for me. I saw the information linked by Commaster, but again, it does not appear to show up in the auto-complete list so I assumed it wasn't working and I was messing up. Will try regardless this afternoon. Thank you both!


I had a typo in the header and it was not including the wx/filedlg.h header. So it WAS me! Thanks for the help, I got it from here.
Using Code::Blocks / Re: Using a file dialog with wxSmith?
« Last post by Miguel Gimenez on November 27, 2023, 09:23:20 am »
wxSmith creates an object called FileDialog1, you can change the name. Use something like this in your menu event:
  if (FileDialog1->ShowModal() == wxID_OK)
EDIT: Fixed object name
Help / Re: WxWidgets not compiling
« Last post by rartigas on November 27, 2023, 09:16:03 am »

Thanks for your answer. I mostly found the problem. In Build Options and Linker settings, you have to specify `wx-config --cflags`and `wx-config --libs`respecrtively. The point is that Codeblocks is ignoring anything that is between the ` symbol.  I have to manually copy the output of wx-config from terminal into t Builder Options and then it works.
Pages: 1 2 3 [4] 5 6 7 8 9 10