none
command line options '/ZI' and '/02' are incompatible

    Question

  • I am compiling my Vc++ code in Release mode and i am getting one error.."command line options '/ZI' and '/02' are incompatible" ...what does this error mean?? how to get rid off it?? plz help...um stuck at dead end...
    Thursday, September 27, 2007 3:53 PM

Answers

  • hi .....
                         Sorry, i committed a silly mistake(That was all in frustration) also ,i am very new to VC++....But there's a good news...

    I added a special option '/VERBOSE' which helped me to see the way my compiler calls and loads modules/libraries....there i found that loading  'nspr4.lib'  failed....i added this library in my 'object/Module' list and My compilation was successful....The 'Debug assertion Failed' error also vanished... Every thing seems to be working....Thanx
    Friday, September 28, 2007 4:57 PM

All replies

  • It means that if you are compiling with optimizations (/O2) then you cannot also create the necessary data layout to support edit and continue (/ZI).

     

    Go to: project -> Properties -> Configuration Properties -> C/C++ -> General and change "Debug Information Format" from "Program Database for Edit & Continue (/ZI)" to "Progam Database (/Zi)"

     

     

    Thursday, September 27, 2007 4:03 PM
  • Thanx Jonathan....It's already 10:05pm in india...I am Out of office Now...i will implement your solution tommorow and hopefully i'll give you some gud news...
    Thursday, September 27, 2007 4:36 PM
  • Hi :Jonathan Caves


    i Did what you said...but doing so i am getting Some errors again....some errors related to Xpcomglue library...

    I am using Vc++ Enterprise edition 6.0....

    below are my detailed project settings...though these are not complete Settings but i think these will help you out to solve my problem....

                                                                    PROJECT SETTINGS
                                                           SETTINGS FOR : Win32 Release

    GENERAL :
                       - Microsoft foundation classes : "Use MFC in a Shared DLL"
                       - Intermediate Files : "Release"
                       - Output files : "Release"
                       - Allow per-configuration Dependencies (i have unticked this option)
    DEBUG :
                       - Category : General
                       - Executables for debug Session : (Nothing is selected)
                       - Working Directory : (Nothing is selected)
                       - Program arguments : (Nothing is Selected)
                       - Remove Executable path and file name - (Nothing is selected)
    C/C++ :
                       - Category : General
                       - Warning level : level 3
                       - Optimization : Maximum speed
                       - Debug Info : program database for edit and continue
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I


                       - Category : C++ language
                       - Representation method : Best case always
                       - Enable exception handling ( i have checked this box)
                       - Enable run time type info. (Unchecked)
                       - Disable construction displacements (Unchecked)
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I
                 
                       - Category : Code generation
                       - Processor : Blend
                       - Use runtime library : Multithread DLL
                       - Calling Convention : _Cdecl
                       - Struct member alignment : 8 bytes
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I

                       - Category : Customization
                       - Disable language extension (Unchecked)
                       - Enable minimal rebuild ( Unchecked)
                       - Enable incremental Compilation (Unchecked)
                       - Suppress startup banner and information messages (Checked)
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I
                   
                       - Category : listing files
                       - generate browse info ( Unchecked)
                       - List file type ( No listing)
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I

                       - Category : optimizations
                       - Optimizations : Maximum speed
                       - Inline function Expansion : Only_Inline
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I

                       - Category : Precompiled Header
                       - Not using precompiled header ( Checked)
                       - Project options : /nologo /MD /w3 /GX /ZI /02 /I


    Friday, September 28, 2007 7:48 AM
  • Hi all..

    when i change

    Project settings-> C/C++-> general->Debug-info->Program database for edit and continue         to      C/C++-> general->Debug-info->Program database

    OR

    when i manually delete the command line option '/ZI'


    i get the following errors::

    -   "xpcomglue_s.lib (nsGenericFactory.obj) : error LNK 2001: Unresolved external symbol  _imp_PR_AtomicIncrement"  (This error is displayed twice)

    -   "Fatal error LNK1120: 2 unresolved Externals"
    Friday, September 28, 2007 8:26 AM
  • Hi all....
               My Debug build was compiling properly......the error were coming in the release mode...This time i went to...
                   build->configurations->release
     i deleted the release configuration....again added a configuration named 'release' and copied all the settings of 'debug' mode (there was an option there 'copy settings from debug mode' i clicked it) now i opened the settings of release mode(which were exactly same as debug mode) i changed the name 'debug' to 'release' wherever it was specified....i compiled the code and it compiled successfully......then

    1)  I compared  dll(got after compilation in debug mode) in debug mode to my   
         dll(got after comilation in release mode) in release mode....sizes of both the
         dll's are same.

    2) There was a "debug assertion failed" pop up which used to come when my functionality use to run is still there....(while I read somewhere on internet that when the project is build in release mode all the assert statements are not checked and hence there should not be any error related to assertions)


    I am really confused and in doubts that whether the dll that i got(after compilation of my project in release mode) is of release mode or not.....
    Friday, September 28, 2007 12:44 PM
  • hi .....
                         Sorry, i committed a silly mistake(That was all in frustration) also ,i am very new to VC++....But there's a good news...

    I added a special option '/VERBOSE' which helped me to see the way my compiler calls and loads modules/libraries....there i found that loading  'nspr4.lib'  failed....i added this library in my 'object/Module' list and My compilation was successful....The 'Debug assertion Failed' error also vanished... Every thing seems to be working....Thanx
    Friday, September 28, 2007 4:57 PM