Author Topic: Error building a WxWidget project  (Read 7267 times)

dada

  • Guest
Error building a WxWidget project
« 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


sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #1 on: February 14, 2006, 07:02:42 pm »
Remove -Winvalid-pch from your project.

dada

  • Guest
Re: Error building a WxWidget project
« Reply #2 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.

sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #3 on: February 14, 2006, 07:35:03 pm »
Project -> Build options -> Other options tab.

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Error building a WxWidget project
« Reply #4 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

sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #5 on: February 14, 2006, 07:40:37 pm »
Yes sorry I was not clear. My bad.  :P

dada

  • Guest
Re: Error building a WxWidget project
« Reply #6 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.

sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #7 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

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Error building a WxWidget project
« Reply #8 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

Offline yop

  • Regular
  • ***
  • Posts: 387
Re: Error building a WxWidget project
« Reply #9 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
Life would be so much easier if we could just look at the source code.

dada

  • Guest
Re: Error building a WxWidget project
« Reply #10 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.

sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #11 on: February 14, 2006, 08:05:49 pm »
Cool no problem.  8) You may want to grab a nightly build though.....

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Error building a WxWidget project
« Reply #12 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

sethjackson

  • Guest
Re: Error building a WxWidget project
« Reply #13 on: February 14, 2006, 08:15:11 pm »
Well he may not want to do that..... That is what I do though.  :D

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Error building a WxWidget project
« Reply #14 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