User forums > Help

Very odd Visual C7.1 compilation error

<< < (2/3) > >>

tdliles:
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!

tdliles:
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.

quickhot:
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 ....  :(

kijoshua:
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...

xorcist:
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

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version