Code::Blocks Forums
User forums => Help => Topic started by: jdg on August 02, 2006, 11:28:16 pm
-
I imported a VC7.1 project file and I get the following message
cl : Command line error D2004 : '/W' requires an argument
Nothing appears in the compiler switch dialog box except /MT so I edited the cbp file and deleted all /W switches. However the message persists. It takes about 30 seconds to decide to tell me too. I have cleaned and rebuilt with zero effect.
I am using the latest stable release. as per the homepage.
-
could you try it out with a nightly build, see this forum for download links.
Ifthe problem still persists, try making your project smaller and smaller and then maybe you can post it here.
-
Actually before I check with a newer version, I've now managed to get the full command line using the 'compiler logging' and i see that the /W switch is there. Is there a way to remove it?
-
check if it has not showed up in the other options in the compiler settings.
But really upgrade to a nightly ;-)
-
I do suggest setting up a nightly build version. It is worlds better. It's been a while since I looked at RC2, but I have a couple of suggestings.
First, did you look in both the Project & Compiler settings (i.e. the global compiler setting and the project build options)? I can't remember if RC2 has these, but I felt it was worth mentioning.
As for the error, it's not really that odd, /W does reqiure an argument (for VC++ 2005: /Wall, /W1, /W2, /W3, /W4, /WL, /Wp64, /WX). My guess is that you have it set somewhere (maybe by default).
jmccay
-
I am getting the same error message: /W requires an argument. Has anybody figured out where it's coming from?? I can not find it in any Project or Compiler settings. Currently using MS C++ Toolkit 2003 with the Aug 30 nightly build. And I did import a MS project. Thanks for any guidance!
-
This is what I'm seeing from the full command line: cl.exe /nologo -W -fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_APP_LIB /I.........
In the Advanced Options for the compiler, the Command line macro: $compiler /nologo $options $includes /c $file /Fo$object
Therefore the $options variable is generating: -W -fexceptions -O2 -DWIN32 -DNDEBUG -D_WINDOWS -D_APP_LIB
I can't find any of these options set anywhere. Where are the 'default' options coming from?? Thanks.
-
Yes, I have the SAME ERROR. So any one can tell me where to get rid of the '/W'? Whatever you check the "Disable all warnings [/w] ...[w1][w2]..." or not, it is still say that .... :(
-
workaround: Settings->Compiler->Global compiler settings->Other settings->Advanced options...
(Other settings is the tab hidden off the window, have to scroll it...)
delete that wacky $options part of the Command line macro. I have no clue where it comes from, but it adds the "-W" which breaks things. It also adds a "-O0" I think, but that only throws a warning about how it is an unknown option.
The downside is that you won't have the options from the compiler settings page applied anymore. So I'd recommend setting the options you want first, copying the command line, then replacing the command line macro with the result after removing the bugs manually.
Decided to give CB a try, and this was one of the many immediate problems that smacked me in the face... Using the latest nightly, this bug (or perhaps poor design) still exists... 6 years later...
-
found a fix... that will take care of this situation.
go to Projects->Build options
Select the project root name
(not Win32 Release or Win32 Debug)
Select Compiler Settings->Other Compiler Options
looks like these GCC compiler flags got copied over from using the GCC compiler. Remove them they're invalid.
-march=i686
-fomit-frame-pointer
-O3
-Wredundant-decls
-Wundef
-Wmissing-declarations
-Wmissing-include-dirs
-Wmain
-Wall
-std=c++98
-m32
/Og
-
Thank you for your effort to sign up just to answer this question. I have one question though: why did it take almost 9 years?
Sign up process too difficult? Question too hard? Bonus points: Where can you get this ancient compiler? Are current compilers still affected by that? Is the current CodeBlocks still affected by that?