User forums > Using Code::Blocks
Code::Blocks and wxWidgets
f4Gg0t_43:
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")
--- Code: ---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 ===|
--- End code ---
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.
stahta01:
Info needed
* Code::Blocks version/SVN
* Compiler with version
* Compiler exception type SJLJ or Dwarf2 (Needed for MinGW GCC 4.x issues)
* wxWidgets version
Some of the possible cause for problems with using wxWidget Library.
* Compiler Bug
* Different version of compiler used on Library and Main Code
Tim S.
f4Gg0t_43:
Code::Blocks 8.02
MingW 3.4.5
wxWidgets 2.8
I do not know what exception type is. :?
stahta01:
--- Quote from: f4Gg0t_43 on August 24, 2009, 03:58:10 am ---Code::Blocks 8.02
MingW 3.4.5
wxWidgets 2.8
I do not know what exception type is. :?
--- End quote ---
The standard for is MingW 3.4.5 SJLJ.
If using Windows Vista the exact build of MingW GCC Matters.
--- Code: ---gcc.exe -v
--- End code ---
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
--- Code: ---gcc.exe -v
--- End code ---
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".)
--- Code: ---@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
--- End code ---
f4Gg0t_43:
I used wxPack.
I am using windows XP.
That command gives
--- Code: ---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)
--- End code ---
That batch files gives
--- Code: ---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
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version