Re: Incompatible command-line options

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Bjarne Nielsen wrote:
Hi all.

I'm trying to debug a release version of my app using VS2003. To be able to debug it, I have set optimization to disabled (/Od) and debug info to "...edit and continue" (/ZI).
When I try to compile it, the compiler complains
"cl : Command line error D2016 : '/O2' and '/ZI' command-line options are incompatible"


"/O2" means "maximze speed", but I have specifically set it to disabled. Is this a known issue in VS2003, or am I doing something wrong?

My actual problem is, that in the release version I cannot show my about box. It works fine in debug, no warnings nor errors, but nothing shows in release. I guess it for some reason returns from DoModal() like for example if there is a resource error, but the resource is fine. Any hints?


To find out if DoModal is failing in the release build you can send a text string containing the return value to the debugger output window by adding code that calls OutputDebugString. This will work even in the optimized release build.


Double-check that you don't have any necessary code inside ASSERT statements. ASSERT statements are not executed in the release build.

--
Scott McPhillips [VC++ MVP]

.



Relevant Pages

  • debugging msp430
    ... I try to debug function parameters inside a function. ... myresult_t DoSomething(portSHORT command, portSHORT* status); ... I set optimization to -O0 so there is no optimization. ...
    (comp.arch.embedded)
  • Re: Incompatible command-line options
    ... >> I'm trying to debug a release version of my app using VS2003. ... > text string containing the return value to the debugger output window by ... > Double-check that you don't have any necessary code inside ASSERT ... ASSERT statements are not executed in the release build. ...
    (microsoft.public.vc.mfc)
  • command-line options are incompatible
    ... I'm trying to debug a release version of my app using VS2003. ... I have set optimization to disabled and debug info to ... When I try to compile it, the compiler complains ... is a resource error, ...
    (microsoft.public.vstudio.general)
  • Incompatible command-line options
    ... I'm trying to debug a release version of my app using VS2003. ... I have set optimization to disabled and debug info to ... When I try to compile it, the compiler complains ... is a resource error, ...
    (microsoft.public.vc.mfc)
  • Re: Using same port number to connect more than one application to ser
    ... ASSERT statements are not compiled in Release versions". ... that the debug build fails: ... We sometimes call it the "ostrich approach" to bug ... SOCKADDR* lpSockAddr, int* lpSockAddrLen) ...
    (microsoft.public.vc.mfc)