Good day,
I'm trying to use wxWidgets with Code::Blocks - but I've problems getting started ;-)
I have built wxWidgets following instructions from this tutorial (german): tutorial (http://www.pronix.de/pronix-1138.html)
I created the project as described there, using these pieces of code (http://nopaste.info/fc4792549c.html).
I can compile the program without problems, but if I start it, it crashes with 0xc0000005.
This is the Traceback (-g as compiler option) (http://nopaste.info/8b8e6ec1a9.html)
I'm using win XP SP3 with Code::Blocks 8.02 and a self-compiled current stable version of wxWidgets, my compiler is MingW
I already asked in #codeblocks, they couldn'T help me directly and recommended to ask in the forum.
Regards,
dispy
Did you put a copy of the Compiler's MinGW DLL in the same folder as the EXE file created.
The error looks like the one I got when I had two MinGW DLL ("mingwm10.dll") on my system.
Note: Also, put any wxWidgets DLLs, you are using, in the EXE folder.
Tim S.
I must compiled a fresh downloaded version of wxWidgets again, following the tutorial above. This time, I didn't copy the files as I think they should match ;)
The following error appears:
QuoteC:\C++\wxWidgets-2.8.10\include\wx\platform.h|196|wx/setup.h: No such file or directory|
How to fix that? Last time I think I just copied the setup.h from include/msw/setup.h to the root - is that the correct way?
The Tutorial doesn'T mention this error ;(
after that we'll see if the error above occurs again - I bet yes, but who knows...
MfG
dispy
Try this to set up wxWidgets for Code::Blocks on windows: http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef)
aah very nice page, much more helpful than google results :D
Thanks guys, you saved my evening. I love you :mrgreen:
Regards
dispy
Hi every body,
I'm a new to code block and i wanna use it to develope a GUI application using the wxwidgets library,
I'm using Ubuntu 9.4 running on VirtualBox (as Virtual machine )
- I installed the Wxwidgets successfully.
# tar -xzvf wxwidgets-2.8.10.tar.gz
# cd wxwidgets-2.8.10
# mkdir build-x11
# cd build-x11
# ../configure --with-x11 --without-gtk --enable-no_rtti --enable-no_exceptions --disable-threads --disable-sockets --disable-joystick --disable-mdi --disable-printarch --disable-postscript --disable-resources --disable-prologio --with-zlib=builtin --with-libpng=builtin --with-libjpeg=builtin --with-libtiff=builtin
# make
#make install
#ldconfig
- I installed the Code::Block successfully too.
#apt-get install codeblocks
- I create a new Wxwidget projects.
file -> new project -> wxwidgets project -> ...- I compiled this project and every thing gonna good.
- Run the project in Linux and the project run successfully
After that i install the Arm-Linux cross compilation tool-chain to the linux as follow:
# cd /opt/FriendlyArm/mini2440/source/
# tar -xzvf arm-linux-gcc-4.3.2.tgz
after unpacking the ziped file it gives me usr directory
export PATH=/opt/FriendlyArm/mini2440/source/usr/local/arm/4.3.2:$PATH
After that i gone to the my code::block
Setting -> compiler and debugger -> choose the GNU ARM GCC compiler -> and under the toolchain executables change this configuration
- c compiler --> arm-linux-gcc
- c++ compiler --> arm-linux-g++
- Linker for dynamic library --> arm-linux-gcc
- Linker for static library --> arm-linux-ar
- Debugger --> arm-linux-qdb
- compiler installation directory --> /opt/FriendlyArm/mini2440/source/usr/local/arm/4.3.2
project -> properties -> build option
Choose release tap -> duplicated ->and choose ArmRelease as new name
Choose the compiler as GNU ARM GCC compiler
OK
and when i compiled ARMRelease it gives me this error
cannot find -lwx_gtk2u_richtext-2.8
I googled in the internet and find that i should add this lines to the configuration
'wx-config --cflags' to the compiler option and
'wx-config --libs' to the linker option
I successfully add this lines to the compiler and linker as follow:
project -> properties -> build-option ->choose ARMRelease -> compiler -> other option
project -> properties -> build-option ->choose ARMRelease -> linker -> other option
After that i got more errors :
this some of all because it is more that 2000 char and it got refused by the forumas follow:
obj/ARMRelease/GUIFrame.o||In function `__static_initialization_and_destruction_0(int, int)':|
GUIFrame.cpp:(.text+0x48)||undefined reference to `std::ios_base::Init::Init()'|
GUIFrame.cpp:(.text+0x64)||undefined reference to `wxEventHashTable::wxEventHashTable(wxEventTable const&)'|
GUIFrame.cpp:(.text+0x174)||undefined reference to `std::ios_base::Init::~Init()'|
GUIFrame.cpp:(.text+0x180)||undefined reference to `wxEventHashTable::~wxEventHashTable()'|
GUIFrame.cpp:(.text+0x18c)||undefined reference to `wxEVT_CLOSE_WINDOW'|
GUIFrame.cpp:(.text+0x190)||undefined reference to `wxEVT_COMMAND_MENU_SELECTED'|
GUIFrame.cpp:(.text+0x194)||undefined reference to `wxEVT_NULL'|
obj/ARMRelease/GUIFrame.o||In function `GUIFrame::GUIFrame(wxWindow*, int, wxString, wxPoint, wxSize, int)':|
GUIFrame.cpp:(.text+0x1dc)||undefined reference to `wxStringBase::InitWith(wchar_t const*, unsigned int, unsigned int)'|
GUIFrame.cpp:(.text+0x1e4)||undefined reference to `wxFrameBase::wxFrameBase()'|
GUIFrame.cpp:(.text+0x1f4)||undefined reference to `wxFrame::Init()'|
GUIFrame.cpp:(.text+0x224)||undefined reference to `wxFrame::Create(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'|
||=== Build finished: 534 errors, 0 warnings ===|
Could any body help me please
I don't know what can i do.
Quote from: mhamed on February 15, 2010, 02:00:40 PM
# ../configure --with-x11 --without-gtk --enable-no_rtti --enable-no_exceptions --disable-threads --disable-sockets --disable-joystick
Quote from: mhamed on February 15, 2010, 02:00:40 PM
cannot find -lwx_gtk2u_richtext-2.8
Guess why again...
QuoteLinker for dynamic library --> arm-linux-gcc
Should that not be arm-linux-g++ ??
Tim S
Hi Tim,
Thanks for your reply
I changed the Linker for dynamic library to --> arm-linux-g++
and reinstall the wxwidgets with removing --without-gtk
and i still have the erreor
Question : if the library was missed how the code block compiled the program for (86 processor)using GNU GCC compiler and didn't compile for ARmGNU GCC compiler
Thanks for your help
M.Hamed
Quote from: mhamed on February 16, 2010, 12:50:49 PM
Question : if the library was missed how the code block compiled the program for (86 processor)using GNU GCC compiler and didn't compile for ARmGNU GCC compiler
What I don't get: You are developing an ARM application (that's why you are using an ARM compiler) but want to link against wxWidgets?! To my knowledge wxWidgets is not available at all for ARM platform, but even if I am wrog, you
must compile/use the ARM version of wxWidgets first.
If you don't want to use wxWidgets on ARM (which I guess is what you want to do), don't setup a wxWidgets project, but start with a simple (ARM) console project.
Quote from: MortenMacFly on February 16, 2010, 02:57:42 PM
Quote from: mhamed on February 16, 2010, 12:50:49 PM
Question : if the library was missed how the code block compiled the program for (86 processor)using GNU GCC compiler and didn't compile for ARmGNU GCC compiler
What I don't get: You are developing an ARM application (that's why you are using an ARM compiler) but want to link against wxWidgets?! To my knowledge wxWidgets is not available at all for ARM platform, but even if I am wrog, you must compile/use the ARM version of wxWidgets first.
If you don't want to use wxWidgets on ARM (which I guess is what you want to do), don't setup a wxWidgets project, but start with a simple (ARM) console project.
I agree with the comments from MortenMacFly and please do NOT hijack threads in the future and please use the correct sub-forum.
If programming on an Arm MCU use http://forums.next.codeblocks.org/index.php/board,22.0.html
Note: wxWidgets needs to be Compiled by the same Compiler Setup used by the Application in nearly ALL cases. This includes PC and Embedded targets. This assumes the application uses wxWidgets.
Tim S.
QuoteQuestion : if the library was missed how the code block compiled the program for (86 processor)using GNU GCC compiler and didn't compile for ARmGNU GCC compiler
What I don't get: You are developing an ARM application (that's why you are using an ARM compiler) but want to link against wxWidgets?! To my knowledge wxWidgets is not available at all for ARM platform, but even if I am wrog, you must compile/use the ARM version of wxWidgets first.
If you don't want to use wxWidgets on ARM (which I guess is what you want to do), don't setup a wxWidgets project, but start with a simple (ARM) console project.
Wxwidgets s support Linux/ARM Arch.for mor information u can see this linkhttp://www.wxwidgets.org/docs/embedded.htm#gettingstarted (http://www.wxwidgets.org/docs/embedded.htm#gettingstarted)
Thanks all for ur replies and sorry for hijack put i was only need help regarding to compiling/linking my project
Thanks
M.Hamed