wxWidgets Issue: wxDummyConsoleApp::OnRun() unreachable code

Viewed 35

I am looking at this example EXAMPLE. I copy past after linking the dlls and all. I get this error after running it:

wxDummyConsoleApp::OnRun() unreachable code thrown in wxWidgets/common/init.cppenter image description here.

Could you please help me?

I am using: Visual Studio 2022 (v143)

Thank you!

1 Answers

I was linking with 2 copies of wxWidgets -- one of which remains uninitialized. This is a problem with your build setting. In my case I was doing this in my prmeake:

links
    {
        "wxbase33ud.lib",
        "wxregexud.lib",
        "comdlg32.lib",
        "advapi32.lib",
        "msvcprtd.lib",
        "oleaut32.lib",
        "wxexpatd.lib",
        "wxzlibd.lib",
        "wxtiffd.lib", 
        "shell32.lib",
        "wxjpegd.lib", 
        "LIBCMT.lib",
        "rpcrt4.lib",
        "user32.lib",
        "wxpngd.lib",
        "gdi32.lib",
        "ole32.lib",
        "wxpng.lib",    
    }

I deleted all this and it works fine.

Related