User forums > General (but related to Code::Blocks)
GCC 4.2.1 binary release for mingw is available from MINGW
RJP Computing:
--- Quote from: pir on September 03, 2007, 11:05:35 am ---Interesting. But building wxWidgets invokes the compiler from the command line via make. Have you managed to build anything by spawning 4.2.1 from within CodeBlocks? Like "Hello world", for example? It would be helpful to know if someone else can do this without problems.
--- End quote ---
Of coarse. I build all my projects with MinGW 4.2.1. It works fine in Code::Blocks and make.
NOTE: These instructions are assuming you are using the simple installer for MinGW v4.2.1 from http://wxpack.sf.net/Main/Downloads
You need to make sure if you installed MinGW to a different directory, other than 'C:\MinGW', that you change four directory paths in Code::Blocks. You need to change the 'Settings->Compiler and Debugger...->Toolchain Executables->Compiler's installation directory' to your custom path (e.g C:\MinGW4). I also must mention that you should NOT install MinGW in a path with spaces. At least until I hear differently. This is the official release and I don't believe it will handle this well, so don't do it. Then you need to change the three directories under 'Settings->Compiler and Debugger...->Search Directories->Compiler', 'Settings->Compiler and Debugger...->Search Directories->Linker', and 'Settings->Compiler and Debugger...->Search Directories->Resource Compiler' to match your installation of MinGW (e.g. 'C:\MinGW4\include).
That is all you should need to do. Hope this helps.
Conan Kudo:
I have built C::B and wxWidgets 2.8.4 built using GCC 4.2.1-sjlj. The dw2 version doesnt seem to work as well as the sjlj version. However, I have noticed that not all the plugins are set to build when I tell the workspace to build, and the envvars plugin cannot handle long file names when linking the DLL...
pir:
--- Quote --- Then you need to change the three directories under 'Settings->Compiler and Debugger...->Search Directories->Compiler', 'Settings->Compiler and Debugger...->Search Directories->Linker', and 'Settings->Compiler and Debugger...->Search Directories->Resource Compiler' to match your installation of MinGW (e.g. 'C:\MinGW4\include).
--- End quote ---
Ho-hum! Missed that bit... I was only setting the toolchain directories, which may explain why I was getting link errors (although still puzzled that the supposedly distinct "dw2" variant was looking for "sjlj" things?)
Thanks - works fine now. I'll just place my tail between my legs and skulk off into a corner...
ingenuus:
The libgcc dll (sjlj or dw2) is a separate download. See the MinGW GCC Version 4 package download page on SourceForge:
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304
Also, does anyone know if the dw2 version is safe on win32? Everyone seems to be using it but I thought that dw2 couldn't unwind foreign frames and so couldn't handle exceptions in the OS or callbacks. Are they just betting that exceptions won't occur or has something changed?
RJP Computing:
--- Quote from: ingenuus on September 18, 2007, 10:37:26 pm ---...
Also, does anyone know if the dw2 version is safe on win32? Everyone seems to be using it but I thought that dw2 couldn't unwind foreign frames and so couldn't handle exceptions in the OS or callbacks. Are they just betting that exceptions won't occur or has something changed?
--- End quote ---
It is working great for me. Actually it fixes a bug in the 3.4.5 sjlj model. It now can properly catch an exception passing the Compiled as C throwing to my C++ main program barrier (I don't know if there is a technical term for that :) ). The exceptions seem to be working as good as Visual C++. I have compiled and use wxWidgets 2.8.4 with it as well.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version