Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Command Line Error

Status
Not open for further replies.

232323

Programmer
May 14, 2001
10
CA
I'm trying to convert an old version of visual c++ into version 6. However im getting the following error when i try to compile. I only have experience programming in c++, so this visual stuff is leaving me blank. ANy suggestions/help would be greatly appreciated

the bug:
--------------------Configuration: Impacts - Win32 Debug--------------------
Compiling...
Command line error D2016 : '/ZI' and '/O1' command-line options are incompatible
Error executing cl.exe.

Impacts.exe - 1 error(s), 0 warning(s)

thanks!!
 
Check out ur directory paths and signature of main();
Regards,
SwapSawe
 
cl.exe is the built in Microsoft Visual c++ compiler .exe You can access it through the MSDOS command prompt by typing
cl /? This will list all the possible commands in that compiler...

here are the options

C/C++ COMPILER OPTIONS

-OPTIMIZATION-

/O1 minimize space /Op[-] improve floating-pt consistency
/O2 maximize speed /Os favor code space
/Oa assume no aliasing /Ot favor code speed
/Ob<n> inline expansion (default n=0) /Ow assume cross-function aliasing
/Od disable optimizations (default) /Ox maximum opts. (/Ogityb1 /Gs)
/Og enable global optimization /Oy[-] enable frame pointer omission
/Oi enable intrinsic functions

-CODE GENERATION-

/G3 optimize for 80386 /Gy separate functions for linker
/G4 optimize for 80486 /Ge force stack checking for all funcs
/G5 optimize for Pentium /Gs[num] disable stack checking calls
/G6 optimize for Pentium Pro /Gh enable hook function call
/GB optimize for blended model (default) /GR[-] enable C++ RTTI
/Gd __cdecl calling convention /GX[-] enable C++ EH (same as /EHsc)
/Gr __fastcall calling convention /Gi[-] enable incremental compilation
/Gz __stdcall calling convention /Gm[-] enable minimal rebuild
/GA optimize for Windows Application /EHs enable synchronous C++ EH
/GD optimize for Windows DLL /EHa enable asynchronous C++ EH
/Gf enable string pooling /EHc extern &quot;C&quot; defaults to nothrow
/GF enable read-only string pooling /QIfdiv[-] enable Pentium FDIV fix
/GZ enable runtime debug checks /QI0f[-] enable Pentium 0x0f fix

-OUTPUT FILES-

/Fa[file] name assembly listing file /Fo<file> name object file
/FA[sc] configure assembly listing /Fp<file> name precompiled header file
/Fd[file] name .PDB file /Fr[file] name source browser file
/Fe<file> name executable file /FR[file] name extended .SBR file
/Fm[file] name map file

-PREPROCESSOR-

/C don't strip comments /FI<file> name forced include file
/D<name>{=|#}<text> define macro /U<name> remove predefined macro
/E preprocess to stdout /u remove all predefined macros
/EP preprocess to stdout, no #line /I<dir> add to include search path
/P preprocess to file /X ignore &quot;standard places&quot;

-LANGUAGE-

/Zi enable debugging information /Zl omit default library name in .OBJ
/ZI enable Edit and Continue debug info /Zg generate function prototypes
/Z7 enable old-style debug info /Zs syntax check only
/Zd line number debugging info only /vd{0|1} disable/enable vtordisp
/Zp[n] pack structs on n-byte boundary /vm<x> type of pointers to members
/Za disable extensions (implies /Op) /noBool disable &quot;bool&quot; keyword
/Ze enable extensions (default)

-MISCELLANEOUS-

/?, /help print this help message /V<string> set version string
/c compile only, no link /w disable all warnings
/H<num> max external name length /W<n> set warning level (default n=1)
/J default char type is unsigned /WX treat warnings as errors
/nologo suppress copyright message /Yc[file] create .PCH file
/Tc<source file> compile file as .c /Yd put debug info in every .OBJ
/Tp<source file> compile file as .cpp /Yu[file] use .PCH file
/TC compile all files as .c /YX[file] automatic .PCH
/TP compile all files as .cpp /Zm<n> max memory alloc (% of default)

-LINKING-

/MD link with MSVCRT.LIB /MDd link with MSVCRTD.LIB debug lib
/ML link with LIBC.LIB /MLd link with LIBCD.LIB debug lib
/MT link with LIBCMT.LIB /MTd link with LIBCMTD.LIB debug lib
/LD Create .DLL /F<num> set stack size
/LDd Create .DLL debug libary /link [linker options and libraries]


You can access these variables in Visual C++ by going Project settings-> c/c++ -> preprocessor... Look at the bottom of the dialog box and see the differnet options that are added to the cl.exe command line. Find the ones that are causing the problems. It also might be a linker error, for that look under settings->link-> look at bottom command line for /z etc..

good luck

ackka
ackka@mad.scientist.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top