Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: dada on February 14, 2006, 06:33:59 pm

Title: Error building a WxWidget project
Post by: dada on February 14, 2006, 06:33:59 pm
Hi,
I use the MS VC++ toolkit as builder. wxWidgets is installed with the MS installer in c:\wxWidgets. I try to build the simplest wx app generated by C:B and I get the following

Project   : wxWidgets application
Compiler  : Microsoft Visual C++ Toolkit 2003 (called directly)
Directory : D:\prove cpp\provaWX\
--------------------------------------------------------------------------------
Switching to target: default
cl : Command line error D2021 : invalid numeric argument '/Winvalid-pch'
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

What's wrong with my try?

Dada

Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 07:02:42 pm
Remove -Winvalid-pch from your project.
Title: Re: Error building a WxWidget project
Post by: dada on February 14, 2006, 07:22:49 pm
It is the first thing I tried, but how? I don't find where C:B store this settings.
D.
Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 07:35:03 pm
Project -> Build options -> Other options tab.
Title: Re: Error building a WxWidget project
Post by: Michael on February 14, 2006, 07:35:38 pm
It is the first thing I tried, but how? I don't find where C:B store this settings.
D.

For -Winvalid-pch:

Quote
Project-->Build options-->Compiler-->Other options

Michael
Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 07:40:37 pm
Yes sorry I was not clear. My bad.  :P
Title: Re: Error building a WxWidget project
Post by: dada on February 14, 2006, 07:46:01 pm
For -Winvalid-pch:

Quote
Project-->Build options-->Compiler-->Other options


Ehm...  :? I feel stupid but in the Project-->Build options-->Compiler-->Other options there is nothing at all to remove, it is blank.
Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 07:48:46 pm
Hmmm could you post the project file? Do you happen to have RC2? If so grab a nightly from here.

http://forums.codeblocks.org/index.php?board=20.0
Title: Re: Error building a WxWidget project
Post by: Michael on February 14, 2006, 07:50:19 pm
Ehm...  :? I feel stupid but in the Project-->Build options-->Compiler-->Other options there is nothing at all to remove, it is blank.

I have these here there:

Quote
-pipe
-mthreads
-Winvalid-pch
-include "wx_pch.h"

Michael
Title: Re: Error building a WxWidget project
Post by: yop on February 14, 2006, 07:58:28 pm
Do you happen to have RC2?
Most probably... Do you remember that the compiler options used to persist when you changed compilers? The project has the valid Winvalid-pch switch for gcc but is building with the M$ compiler. Switch the compiler of your project back to gcc to see if it appears. If you don't have gcc then you can edit the project file by hand but it's better to...
...grab a nightly from here.
http://forums.codeblocks.org/index.php?board=20.0
Title: Re: Error building a WxWidget project
Post by: dada on February 14, 2006, 07:59:29 pm
OK, I've found it. Now, I get other errors, but this is another story. :)
Thank you.
D.
Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 08:05:49 pm
Cool no problem.  8) You may want to grab a nightly build though.....
Title: Re: Error building a WxWidget project
Post by: Michael on February 14, 2006, 08:11:14 pm
You may want to grab a nightly build though.....

...or build C::B from the SVN sources :lol:.

Michael
Title: Re: Error building a WxWidget project
Post by: sethjackson on February 14, 2006, 08:15:11 pm
Well he may not want to do that..... That is what I do though.  :D
Title: Re: Error building a WxWidget project
Post by: Michael on February 14, 2006, 08:26:28 pm
Well he may not want to do that..... That is what I do though.  :D

Yes, could be :). Using the nightly builds is great, but personally I prefer to build C::B by myself. Useful to learn about C::B :).

Michael