I have Code::Blocks with mingw, and I followed the wxWidgets installation, but when I try to compile a simple program, it gives the following linker errors. (A lot of undefined references to "__Unwind_Resume" and "___gxx_personality_v0")
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.text+0x61e)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.text+0x86a)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.text+0x9c1)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.text+0xac6)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.text+0xc2c)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_dlgcmn.o):dlgcmn.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_datacmn.o):datacmn.cpp:(.eh_frame+0x11)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.text+0x7ed)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.text+0x8b6)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.text+0xa0d)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.text+0xb55)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.text+0xb67)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_gdicmn.o):gdicmn.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_validate.o):validate.cpp:(.text+0x20c)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_validate.o):validate.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_statline.o):statline.cpp:(.text+0x185)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_statline.o):statline.cpp:(.text+0x30e)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_statline.o):statline.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.text+0x281)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.text+0x395)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.text+0x3e9)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.text+0x439)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.text+0x584)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_control.o):control.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_ctrlcmn.o):ctrlcmn.cpp:(.text+0x4ec)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_ctrlcmn.o):ctrlcmn.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x1588)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x1a92)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x2221)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x249f)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.text+0x3060)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_window.o):window.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.text+0x495)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.text+0x5ea)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.text+0x6b4)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.text+0x8d7)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.text+0xaa9)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_button.o):button.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.text+0x829)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.text+0x8e0)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.text+0xb71)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.text+0xcec)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.text+0xda6)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_font.o):font.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.text+0x2af)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.text+0x3d5)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.text+0x4da)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.text+0x880)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.text+0x99f)||undefined reference to `__Unwind_Resume'|
C:\wxWidgets2.8\lib\gcc_lib\libwxmsw28_core.a(corelib_fontcmn.o):fontcmn.cpp:(.eh_frame+0x12)||undefined reference to `___gxx_personality_v0'|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options...|
||=== Build finished: 50 errors, 0 warnings ===|
By the way, when I check the "Use wxWidgets dll" it does compile, but it requires a dll to run the executable. I want it all packaged into one file.
Code::Blocks 8.02
MingW 3.4.5
wxWidgets 2.8
I do not know what exception type is. :?
The standard for is MingW 3.4.5 SJLJ.
If using Windows Vista the exact build of MingW GCC Matters.
What is your windows version? (98, XP, Vista, etc.)
Did you build wxWidgets yourself?
If yes was it built with MingW GCC 3.4.5?
Tim S.
The command below is enough to start with
Batch file to get more info about MinGW GCC works on Windows XP/should work on Vista
create as batch file I use name version-of-gcc.bat in the MinGW Installation folder.
(default folder is normally "C:\MinGW".)
@echo off
REM credit to Peter Ward work in ReactOS Build Environment RosBE.cmd it gave me a starting point that I edited.
::
:: Display the current version of GCC, ld, make and others.
::
REM %CD% works in Windows XP, not sure when it was added to Windows
REM set GCCBASEDIR=C:\MinGW
set GCCBASEDIR=%CD%
ECHO GCCBASEDIR=%GCCBASEDIR%
SET PATH=%GCCBASEDIR%\bin;%SystemRoot%\system32
REM ECHO %PATH%
REM ECHO %GCCBASEDIR%\bin\pic30-gcc.exe
if exist "%GCCBASEDIR%\bin\gcc.exe" (gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\ld.exe" (ld.exe -v)
REM 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\pic30-gcc.exe" (pic30-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\pic32-gcc.exe" (pic32-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\msp430-gcc.exe" (msp430-gcc.exe -v 2>&1 | find "gcc version")
if exist "%GCCBASEDIR%\bin\arm-elf-gcc.exe" (arm-elf-gcc.exe -v 2>&1 | find "gcc version")
REM if exist %GCCBASEDIR%\bin\pic32-gcc.exe pic32-gcc.exe -print-search-dirs
if exist %GCCBASEDIR%\bin\pic32-ld.exe (pic32-ld.exe -melf32pic32mx -v)
if exist %GCCBASEDIR%\bin\windres.exe (windres --version | find "GNU windres")
if exist %GCCBASEDIR%\bin\dlltool.exe (dlltool --version | find "GNU dlltool")
if exist %GCCBASEDIR%\bin\pexports.exe (pexports | find "PExports" )
if exist %GCCBASEDIR%\bin\mingw32-make.exe (mingw32-make -v | find "GNU Make")
if exist %GCCBASEDIR%\bin\make.exe (ECHO It is not recommended to have make.exe in mingw/bin)
REM ECHO "The minGW runtime version is the same as __MINGW32_VERSION"
if exist "%GCCBASEDIR%\include\_mingw.h" (type "%GCCBASEDIR%\include\_mingw.h" | find "__MINGW32_VERSION" | find "#define")
if exist "%GCCBASEDIR%\include\w32api.h" (type "%GCCBASEDIR%\include\w32api.h" | find "__W32API_VERSION")
:_end
PAUSE
I used wxPack.
I am using windows XP.
That command gives
C:\Program Files\CodeBlocks\MinGW\bin>gcc -v
Reading specs from ./../lib/gcc/mingw32/3.4.5/specs
Configured with: ../gcc-3.4.5/configure --with-gcc --with-gnu-ld --with-gnu-as -
-host=mingw32 --target=mingw32 --prefix=/mingw --enable-threads --disable-nls --
enable-languages=c,c++,f77,ada,objc,java --disable-win32-registry --disable-shar
ed --enable-sjlj-exceptions --enable-libgcj --disable-java-awt --without-x --ena
ble-java-gc=boehm --disable-libgcj-debug --enable-interpreter --enable-hash-sync
hronization --enable-libstdcxx-debug
Thread model: win32
gcc version 3.4.5 (mingw-vista special)
That batch files gives
GCCBASEDIR=C:\Program Files\CodeBlocks\MinGW
gcc version 3.4.5 (mingw-vista special)
GNU ld (GNU Binutils) 2.18.50.20080109
#define __MINGW32_VERSION 3.14
#define __W32API_VERSION 3.11
I am using g++.
mingw32-g++.exe -LC:\wxWidgets2.8\lib\gcc_lib -LC:\boost\lib -o bin\Debug\4.exe obj\Debug\_Main.o obj\Debug\_App.o obj\Debug\resource.res -lwxmsw28_core -lwxbase28 -lwxpng -lwxzlib -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 -mwindows
Duplicated the errors with wxPack and the newest TDM GCC Compiler.
GCCBASEDIR=C:\GreenApps\MinGW_GCC4_41_TDM1
gcc version 4.4.1 (TDM-1 mingw32)
GNU ld (GNU Binutils) 2.19.1
GNU windres (GNU Binutils) 2.19.1
GNU dlltool (GNU Binutils) 2.19.1
GNU Make 3.81
#define __MINGW32_VERSION 3.16
#define __W32API_VERSION 3.13
My errorss
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0x2dc): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0x9e8): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0xa08): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0xc8b): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0xe9e): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.text+0xeb0): more undefined references to `_Unwind_Resume' follow
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_app.o):app.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_main.o):main.cpp:(.text+0x13f): undefined reference to `_Unwind_Resume'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_main.o):main.cpp:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
C:\SourceCode\Libraries\wxWidgets2.8\lib\gcc_lib/libwxmsw28_core.a(corelib_icon.o):icon.cpp:(.text+0x272): undefined reference to `_Unwind_Resume'
I suggest trying the newer wxPack and see if the problem goes away.
Tomorrow I will see if I have time to test wxPack_v2.8.9.02.
College classes begin Tomorrow; no idea if I will have the time till next weekend or not.
Tim S.