Author Topic: wxWidgets Preprocessing Problems  (Read 6028 times)

Offline TimothyS

  • Single posting newcomer
  • *
  • Posts: 8
wxWidgets Preprocessing Problems
« on: September 23, 2009, 06:55:14 pm »
I just finished following the tutorials here (at least the steps pertaining to wxWidgets, already have Code::Blocks set up) and here in an attempt to get wxWidgets set up with Code::Blocks, but when I try to compile a wxWidgets project I get the error:

Code
=== wxWidgetsTest, Release ===
preprocessing failed.
=== Build finished: 1 errors, 0 warnings ===

That's it, no error code, no reason given for the failure, nothing... what am I doing wrong?  I followed the instructions in the tutorials to the letter...

Oh, I get the same error even if I un-check the "Create and use pre-compiled headers" option...
Languages:  C++ (Newbie)
OS:  Windows XP Pro, SP3, 32bit
Compiler:  MinGw gcc v3.4.5
IDE:  Code::Blocks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: wxWidgets Preprocessing Problems
« Reply #1 on: September 24, 2009, 12:50:05 am »
What version/svn of Code::Blocks?
What version of wxPack??
What Compiler and the version number of it?
If Compiler is MinGW GCC 4.x or higher; is it DW2 or SJLJ?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TimothyS

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets Preprocessing Problems
« Reply #2 on: September 24, 2009, 01:00:55 am »
Code::Blocks v8.2 (with MINGW, windows binary installer)
wxPack v2.8.9.02
I'm pretty sure I'm using the MinGw GCC compiler, although I'm not 100% sure about the version... it's the version that comes with the Code::Blocks v8.2 w/ Mingw binary...

According to the readme file in MinGw\doc: "This version of binutils was compiled from the vanila 2.18.50-20080109
snapshot."  Not sure if that's the compiler version or not...

Sorry for not posting this in the first place... I know better too...

For future notice, what is the best way to find the version of the currently installed compiler/debugger/etc.?

Thanks for your time!
Languages:  C++ (Newbie)
OS:  Windows XP Pro, SP3, 32bit
Compiler:  MinGw gcc v3.4.5
IDE:  Code::Blocks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: wxWidgets Preprocessing Problems
« Reply #3 on: September 24, 2009, 01:08:33 am »
Turn on full compiler logging and post the results here. Note, I need the results on the Command log not the error message log.

http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F

The following is how to get mingw gcc version info.
Code
gcc -v 

Edit: What OS are you using?
If vista, you need to upgrade to the newer MinGW gcc 3.4.5 or TDM gcc 4.4.0!

Tim S.
« Last Edit: September 24, 2009, 01:10:45 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TimothyS

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets Preprocessing Problems
« Reply #4 on: September 24, 2009, 04:02:39 am »
Okay, I have GCC v3.4.5 and am running Windows XP Pro SP3, 32bit.

Here's the command log from the compile...
Code
-------------- Build: Debug in wxWidgetsTest ---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall  -g -D__WXDEBUG__    -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32" -I"C:\Program Files\CodeBlocks\DevPaks\include"  -c "C:\Documents and Settings\Timothy Sassone\My Documents\C++\wxWidgetsTest\wx_pch.h" -o wx_pch.h.gch\Debug_wx_pch_h_gch
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall  -g -D__WXDEBUG__    -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32" -I"C:\Program Files\CodeBlocks\DevPaks\include"  -c "C:\Documents and Settings\Timothy Sassone\My Documents\C++\wxWidgetsTest\wxWidgetsTestMain.cpp" -o obj\Debug\wxWidgetsTestMain.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall  -g -D__WXDEBUG__    -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32" -I"C:\Program Files\CodeBlocks\DevPaks\include"  -c "C:\Documents and Settings\Timothy Sassone\My Documents\C++\wxWidgetsTest\wxWidgetsTestApp.cpp" -o obj\Debug\wxWidgetsTestApp.o
windres.exe -i C:\DOCUME~1\TIMOTH~1\MYDOCU~1\C__~1\WXWIDG~1\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxWidgets\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32"
gcc: Files\CodeBlocks\PDCurses-SO: No such file or directory
gcc: Files\CodeBlocks\PDCurses-SO\win32: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 40 seconds)
1 errors, 0 warnings

It would seem there is a problem related to PDCurses, but it is not referenced in any of the source files, and I don't have any trouble compiling projects using PDCurses, or my project using Allegro...

Thanks again for all your help!
Languages:  C++ (Newbie)
OS:  Windows XP Pro, SP3, 32bit
Compiler:  MinGw gcc v3.4.5
IDE:  Code::Blocks

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: wxWidgets Preprocessing Problems
« Reply #5 on: September 24, 2009, 04:27:35 am »
Change the version of windres (to one that supports spaces) or use a path with no spaces or special characters in it.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline TimothyS

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets Preprocessing Problems
« Reply #6 on: September 24, 2009, 01:51:17 pm »
Moved all the projects into a new folder "C:\Cpp".  Unfortunately, it seems it's trill trying to look in "Program Files" for the curses library, which it wouldn't be able to find there even if it could use spaces, as I haven't had Code::Blocks or any other programming related files in "Program Files" since I discovered how much it dislikes spaces in file names...

That being said, when I first started I let CodeBlocks install to the default program files folder, so I'm guessing there has to be a record somewhere that's telling it to look there, but I don't know where... I checked my environment variables, to see if there was one there holding a path with a space in it, but nothing, save the temp folder ones... should I change those?

Thanks again for all your time and help!
Code
-------------- Build: Debug in wxWidgetsTest ---------------

mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE  -Winvalid-pch -include wx_pch.h -DWX_PRECOMP -Wall  -g -D__WXDEBUG__    -IC:\wxWidgets\include -IC:\wxWidgets\contrib\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32" -I"C:\Program Files\CodeBlocks\DevPaks\include"  -c C:\Cpp\wxWidgetsTest\wxWidgetsTestApp.cpp -o obj\Debug\wxWidgetsTestApp.o
windres.exe -i C:\Cpp\WXWIDG~1\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\wxWidgets\include -IC:\wxWidgets\lib\gcc_dll\mswud -I"C:\Program Files\CodeBlocks\PDCurses-SO" -I"C:\Program Files\CodeBlocks\PDCurses-SO\win32"
gcc: Files\CodeBlocks\PDCurses-SO: No such file or directory
gcc: Files\CodeBlocks\PDCurses-SO\win32: No such file or directory
windres.exe: preprocessing failed.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings
 

[EDIT]: Just realized it's looking for the DevPaks folder in Program Files too... I'll see if I can figure out why during my down-time at school today...
Languages:  C++ (Newbie)
OS:  Windows XP Pro, SP3, 32bit
Compiler:  MinGw gcc v3.4.5
IDE:  Code::Blocks

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxWidgets Preprocessing Problems
« Reply #7 on: September 24, 2009, 02:07:47 pm »
but I don't know where...
As these are include directories for the resourcee compiler, they are either:
- in the compiler options
- in the project options
- in the targets options.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline TimothyS

  • Single posting newcomer
  • *
  • Posts: 8
Re: wxWidgets Preprocessing Problems
« Reply #8 on: September 24, 2009, 02:29:51 pm »
That did it, thanks!

Tim
Languages:  C++ (Newbie)
OS:  Windows XP Pro, SP3, 32bit
Compiler:  MinGw gcc v3.4.5
IDE:  Code::Blocks