Author Topic: Code::Blocks 12.11 and wxWidgets  (Read 6398 times)

Offline ramrodboy

  • Single posting newcomer
  • *
  • Posts: 2
Code::Blocks 12.11 and wxWidgets
« on: April 03, 2013, 12:01:02 pm »
Code::Blocks 12.11
when i create project with wxWidgets when i build project exe file shuting down.

but i use in Code::Blocks old version there is no problem

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Code::Blocks 12.11 and wxWidgets
« Reply #1 on: April 03, 2013, 12:47:25 pm »
If you use the newer MinGW shipped with C::B 12.11, but your wxWidgets is compiled with an older revision of MinGW, you have to recompile your wxWidgets.
The app and the library have to be compiled with the same compiler version.

Offline ramrodboy

  • Single posting newcomer
  • *
  • Posts: 2
Re: Code::Blocks 12.11 and wxWidgets
« Reply #2 on: April 17, 2013, 06:49:27 pm »
Code::Blocks Ver. 12.11
i download http://sourceforge.net/projects/wxpack/files/wxpack/2.8.12.01/wxPack_v2.8.12.01.exe/download wxpack
my pc windows 7 32 bit

i build project there is no problem but when i run the exe it closed itself and build log is,

Checking for existence: C:\dg\bin\Debug\dg.exe
Executing: "C:\dg\bin\Debug\dg.exe"  (in C:\dg\.)
Process terminated with status -1073741819 (0 min

when i press debug / contunie button it give that lines


#0 ??   0x67629672 in wxObject::wxObject (this=0x403dba <operator new(unsigned int)+182>) (../../include/wx/object.h:412)
#1 ??   0x6724d164 in wxEvtHandler::wxEvtHandler (this=0x403dba <operator new(unsigned int)+182>) (../../src/common/event.cpp:1031)
#2 ??   0x671c126b in wxAppConsole::wxAppConsole (this=0x403dba <operator new(unsigned int)+182>) (../../src/common/appbase.cpp:122)
#3 ??   0x672f4325 in wxAppBase::wxAppBase (this=0x403dba <operator new(unsigned int)+182>) (../../src/common/appcmn.cpp:84)
#4 ??   0x672643b5 in wxApp::wxApp (this=0x403dba <operator new(unsigned int)+182>) (../../src/msw/app.cpp:510)
#5 0040E40D   dgApp::dgApp(this=0x18e8780) (C:/dg/dgApp.h:15)
#6 004013A4   wxCreateApp() (C:\dg\dgApp.cpp:18)
#7 671F4D81   wxEntryStart(argc=@0x22fda0: 1, argv=0x18e8508) (../../src/common/init.cpp:273)
#8 671F51EF   wxInitialize(argc=1, argv=0x18e8508) (../../src/common/init.cpp:479)
#9 675E165C   wxInitializer::wxInitializer(this=0x22fddf, argc=1, argv=0x18e8508) (../../include/wx/init.h:81)
#10 671F507C   wxEntryReal(argc=@0x22fe2c: 1, argv=0x18e8508) (../../src/common/init.cpp:417)
#11 672532B4   wxEntry(argc=@0x22fe2c: 1, argv=0x18e8508) (../../src/msw/main.cpp:231)
#12 672534A3   wxEntry(hInstance=0x400000, nCmdShow=10) (../../src/msw/main.cpp:386)
#13 0040141A   WinMain@16(hInstance=0x400000, hPrevInstance=0x0, lpCmdLine=0x662217 "", nCmdShow=10) (C:\dg\dgApp.cpp:18)
#14 0040F57B   main () (??:??)


#0 line color is red



and
build log is


Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\dg\
Adding source dir: C:\dg\
Adding file: C:\dg\bin\Debug\dg.exe
Changing directory to: C:/dg/.
Set variable: PATH=.;C:\wxWidgets2.8\lib\gcc_dll;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Windows Live\Shared
Starting debugger: C:\Program Files\CodeBlocks\MINGW\bin\gdb.exe -nx -fullname  -quiet  -args C:/dg/bin/Debug/dg.exe
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 3676
Program received signal SIGSEGV, Segmentation fault.
In wxObject::wxObject (this=0x403dba <operator new(unsigned int)+182>) at ../../include/wx/object.h:412 ()


what can i do :(
 
 


« Last Edit: April 17, 2013, 07:00:03 pm by ramrodboy »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: Code::Blocks 12.11 and wxWidgets
« Reply #3 on: April 17, 2013, 07:20:49 pm »
can you read?

If you use the newer MinGW shipped with C::B 12.11, but your wxWidgets is compiled with an older revision of MinGW, you have to recompile your wxWidgets.
The app and the library have to be compiled with the same compiler version.

on the wxPack side there is written: "his release only has MinGW GCC v4.4.1"
and on the download site of c::b:  "The codeblocks-12.11mingw-setup.exe file includes the GCC compiler and GDB debugger from TDM-GCC (version 4.7.1, 32 bit)."
So the versions of wxPack and your compiler doesn't match....
you have to compile wx on your own (no big deal with this guide: http://wiki.wxwidgets.org/Compiling_wxWidgets_with_MinGW