Author Topic: compile problems in debug target for wxWidgets project  (Read 4745 times)

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
compile problems in debug target for wxWidgets project
« on: December 17, 2007, 10:58:53 pm »
My wxWidgets project compiles in the default target (with some warnings).
When run the main screen apears as expected, but when I choose a menu option, I don't get the right result.
Therefore I tried to build the debug target.
Then I get this message:
Quote
-------------- Build: Debug in wxVertaal ---------------

Precompiling header: wx_pch.h
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cc1plus.exe: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Before I send a bug report to the mingw builders:
does anybody have an idea what happens here?
As far as I know the only difference between the default and the debug target is the production of debugging symbols.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: compile problems in debug target for wxWidgets project
« Reply #1 on: December 18, 2007, 05:21:56 pm »
The MinGW builders will only be able to help you if you include the command line that caused the crash (as well as the preprocessed source). The same goes for us. Enable full command-line logging in the build log (it's in the global compiler settings).
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: compile problems in debug target for wxWidgets project
« Reply #2 on: December 18, 2007, 09:38:24 pm »
Trying to find out what causes the crash I started a new wxWidgets project, and imediately (without changing anything in the code) did a debug build. This crashes also.
After setting Full command line compiler logging this is the Build log:
Quote
-------------- Build: Debug in test ---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall  -g -D__WXDEBUG__    -II:\wxWidgets-2.8.7\include -II:\wxWidgets-2.8.7\contrib\include -II:\wxWidgets-2.8.7\lib\gcc_dll\mswud  -c "C:\Documenten Wobien\code_blocks\wxWidgets\test\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
cc1plus.exe: internal compiler error: Aborted
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.mingw.org/bugs.shtml> for instructions.
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

I then tried it again, making another new project, this time unchecking "Create and use precompiled headers" when creating the project.
This time the debug build works fine, and I can run a debug session, set breakpoints etc.

Questions:
1. What is the preprocessed source, and where do I find it?

2. Are precompiles headers incompatible with a debug build?

3. How can I remove the precompiling of headers from my existing project?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: compile problems in debug target for wxWidgets project
« Reply #3 on: December 18, 2007, 10:19:00 pm »
1. What is the preprocessed source, and where do I find it?
You would add -save-temps to the compile command (Project build options->Compiler settings->Other options). This should generate a file named something like wx_pch.h.ii (among others). This won't be useful to us at the Code::Blocks forums, but if you submit a bug to the MinGW project they may request it.

Quote
2. Are precompiles headers incompatible with a debug build?
No. This normally works just fine. I personally am unable to duplicate the problem you're experiencing. You may want to try reinstalling MinGW and wxWidgets. Also, you should make sure you're using the latest stable versions of all the MinGW packages (but don't use binutils-2.17.50-20070119 -- it has a bug which makes it fail to build wxWidgets; use 2.17.50-20060824).

Quote
3. How can I remove the precompiling of headers from my existing project?
In your project's Management window, find the header that is being precompiled (wx_pch.h), right-click it and select Properties. Select the build tab, uncheck "Compile file", and move the Priority weight slider back to 50. Better yet, remove the file from the project altogether and remove any #includes referencing it (you'll then have to #include the specific wxWidgets headers individually).
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline kkez

  • Almost regular
  • **
  • Posts: 153
    • WinapiZone
Re: compile problems in debug target for wxWidgets project
« Reply #4 on: December 18, 2007, 11:24:21 pm »
Code
-II:\wxWidgets-2.8.7\contrib\include

Maybe this is confusing mingw: try to move wxwidgets to another hard disk

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: compile problems in debug target for wxWidgets project
« Reply #5 on: December 19, 2007, 12:43:24 am »
Code
-II:\wxWidgets-2.8.7\contrib\include

Maybe this is confusing mingw ...
No, this is not the case.
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline wobien

  • Multiple posting newcomer
  • *
  • Posts: 69
Re: compile problems in debug target for wxWidgets project
« Reply #6 on: December 19, 2007, 02:16:27 pm »
Thanks a lot for your help.
I reinstalled and compiled wxWidgets 2.8.7 (it is the same I allready had) on drive C: this time.
No more crashing now.
A difference between my former build of wxWidgets and this one is that I first followed the instructions in the Wiki Nightly Cookbook, and now I used the Wiki Installing Code::Blocks from source on Windows. There is a difference in the compile statement for wxWidgets, the Installing on Windows uing the option USE_XRC=1, and the Cookbook doesn't.

I removed the header precompiling (exept from removing it from my code I also had to remove it from Compiler settings - Other options before it stopped appearing).

Still the default build compiles and the debug build doesn't, but now I get normal messages, so I can try to find the bugs.