Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: Cinolt on August 15, 2010, 02:29:08 am

Title: wxWidgets -Wfatal-errors doesn't work
Post by: Cinolt on August 15, 2010, 02:29:08 am
I have a wxWidgets project and when I have -Wfatal-errors as one of my compile options then it gives this error:

cc1plus.exe: error: unrecognized command line option "-Wfatal-errors"
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 0 warnings

How can I fix this?
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: stahta01 on August 15, 2010, 03:14:24 am
Install/use/setup a compiler that supports that option.
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: Cinolt on August 15, 2010, 03:35:07 am
What do you recommend?
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: stahta01 on August 15, 2010, 04:07:03 am
TDM build of MinGW GCC works good for me; I would use his newest 4.4 build; the new 4.5 build is not as stable yet.

You could also use the one that is packaged with Code::Blocks 10.05.

Tim S.
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: Cinolt on August 15, 2010, 04:19:46 am
I am using the one packaged with Code::Blocks 10.05.
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: stahta01 on August 15, 2010, 04:28:55 am
1. Turn on Full Compiler Logging
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

2. Verify the compiler you are using by checking the installation directory under the toolchain configuation.
http://wiki.codeblocks.org/index.php?title=Installing_a_supported_compiler#Compiler-neutral_setup_steps

I tested your "-Wfatal-errors" and it worked for me using the MinGW packaged with CB 10.05 "gcc version 4.4.1 (TDM-2 mingw32)"
Note: My install is not a standard way(uses non-standard paths); but it should make no difference.

Tim S.

Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: Cinolt on August 15, 2010, 04:44:13 am
mingw32-g++.exe -Wfatal-errors -Wall -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP  -g    -IC:\wxWidgets-2.8.11\include -IC:\wxWidgets-2.8.11\lib\gcc_dll\mswu  -c "C:\Project\frame.cpp" -o obj\Debug\frame.o

I actually was mistaken in saying that I used the MinGW that came with C::B. I'm using MinGW version 5.1.6 found here: http://sourceforge.net/projects/mingw/files/

But for something as simple as halting compilation after the first error is found shouldn't be an issue with versions should it?
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: stahta01 on August 15, 2010, 04:52:39 am
mingw32-g++.exe -Wfatal-errors -Wall -DWXUSINGDLL -DwxUSE_UNICODE -DWX_PRECOMP  -g    -IC:\wxWidgets-2.8.11\include -IC:\wxWidgets-2.8.11
But for something as simple as halting compilation after the first error is found shouldn't be an issue with versions should it?

The message you got said the compiler did NOT support that option.

Tim S.
Title: Re: wxWidgets -Wfatal-errors doesn't work
Post by: Cinolt on August 15, 2010, 05:00:24 am
Ok, I installed the latest TDM GCC and it works now. I had my head wrapped around it being a wxWidgets specific issue for some reason.