From: phil oakleaf on
David Ching wrote:
> "phil oakleaf" <news(a)oakleafsoftware.co.uk> wrote in message
> news:#i23#pAMKHA.1472(a)TK2MSFTNGP05.phx.gbl...
>> I'm trying to compile with full debug information
>>
>>
>> In the optimisation I've set
>> Optimisation Disabled (/Od)
>>
>> debug info set to
>> Program Database for Edit & Continue (/ZI)
>>
>>
>> But the compiler complains
>> '/O2' and '/ZI' command-line options are incompatible
>>
>> Any help will be Much appreciated
>>
>
> So you say you set /Od but the error says it is set to /O2? Go to the
> compiler settings and click on the Command Line option; make sure only
> one is set.
>
> -- David
>
>
I have checked that and on the command line it says /Od

How can the compiler still be getting the /O2 setting?

Phil
From: Joseph M. Newcomer on
Show us the command line itself.
joe

On Tue, 08 Sep 2009 09:19:57 +0100, phil oakleaf <news(a)oakleafsoftware.co.uk> wrote:

>Joseph M. Newcomer wrote:
>> Did you think of looking at the compiler options? Because "symbols for Edit-and-continue"
>> is INCOMPATIBLE with /O2 (as already pointed out by the error message), you have to set
>> the option for symbol information to NOT create symbols for Edit-and-Continue. RTFM. /Zi
>> creates complete debugging information. So your error was in choosing the wrong kind of
>> debug information. If you get an error that says explicitly what is wrong, then your
>> first reaction should be "what do I need to change to make this error go away?" and it
>> clearly says that if you have optimization set, you cannot use "Program Database for Edit
>> & Continue". This option would apply only to the debug version, not the release version.
>> joe
>>
>> On Mon, 07 Sep 2009 23:28:15 +0100, phil oakleaf <news(a)oakleafsoftware.co.uk> wrote:
>>
>>> I'm trying to compile with full debug information
>>>
>>>
>>> In the optimisation I've set
>>> Optimisation Disabled (/Od)
>>>
>>> debug info set to
>>> Program Database for Edit & Continue (/ZI)
>>>
>>>
>>> But the compiler complains
>>> '/O2' and '/ZI' command-line options are incompatible
>>>
>>> Any help will be Much appreciated
>>>
>>> Phil
>> Joseph M. Newcomer [MVP]
>> email: newcomer(a)flounder.com
>> Web: http://www.flounder.com
>> MVP Tips: http://www.flounder.com/mvp_tips.htm
>Joseph
>
>thanks for the reply
>
>The problem is that I have Optimisation OFF but the compiler keeps
>telling me it is /O2
>
>I really have looked at the compiler options :)
>
>Phil
Joseph M. Newcomer [MVP]
email: newcomer(a)flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
From: Volker Enderlein on
Hi Phil,

On 08/09/2009 00:28, phil oakleaf wrote:
> I'm trying to compile with full debug information
>
>
> In the optimisation I've set
> Optimisation Disabled (/Od)
>
> debug info set to
> Program Database for Edit & Continue (/ZI)
>
>
> But the compiler complains
> '/O2' and '/ZI' command-line options are incompatible
>
> Any help will be Much appreciated
>
> Phil

you can set the optimization switch for both the source file (*.cpp) and
the project (*.vcproj). And, the settings in the source file will always
overwrite the settings in the project file.
I suppose you have set the optimization switch for a separate source
file and changed it now in the project file. If you can't locate it in
the Visual Studio GUI you might use your favorite text editor and search
for /O2 in the project file (which is plain XML).

Cheers Volker

--
From: phil oakleaf on
Command Line
--------------------
/Od /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yu"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release\\" /Fd"c:\callidusOutput\release\vc80.pdb"
/W0 /nologo /c /ZI /errorReport:prompt


Output from the Build
--------------------------------------
1>------ Build started: Project: callidusXML, Configuration: Release
Win32 ------
1>Compiling...
1>cl : Command line error D8016 : '/O2' and '/ZI' command-line options
are incompatible
1>Build log was saved at "file://c:\callidusOutput\release\BuildLog.htm"
1>callidusXML - 1 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

BuildLog.html
-------------------------------------------------
Note: There is a refence to /O2 in the BuildLog.html but I dont know how
that can be if the command line doesn't have it.

Build Log Build started: Project: callidusXML, Configuration:
Release|Win32
Command Lines Creating temporary file
"c:\callidusOutput\release\RSP00000828924912.rsp" with contents
[
/Od /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yu"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release\\" /Fd"c:\callidusOutput\release\vc80.pdb"
/W0 /c /ZI /MP

..\FloorPaintBrushes.cpp
-- lots of other files
]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000828924912.rsp /nologo
/errorReport:prompt"
Creating temporary file
"c:\callidusOutput\release\RSP00000928924912.rsp" with contents
[
/O2 /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yc"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release\\" /Fd"c:\callidusOutput\release\vc80.pdb"
/W0 /c /ZI /MP

".\ASCII Format.cpp"
]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000928924912.rsp /nologo
/errorReport:prompt"
Creating temporary file
"c:\callidusOutput\release\RSP00000A28924912.rsp" with contents
[
/O2 /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yu"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release\\" /Fd"c:\callidusOutput\release\vc80.pdb"
/W0 /c /ZI /MP

..\F_Fdraw.cpp


]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000A28924912.rsp /nologo
/errorReport:prompt"
Creating temporary file
"c:\callidusOutput\release\RSP00000B28924912.rsp" with contents
[
/Od /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yu"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release/Carpettl1.obj"
/Fd"c:\callidusOutput\release\vc80.pdb" /W0 /c /ZI /MP

..\Carpettl.cpp
]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000B28924912.rsp /nologo
/errorReport:prompt"
Creating temporary file
"c:\callidusOutput\release\RSP00000C28924912.rsp" with contents
[
/Od /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Fo"c:\callidusOutput\release\\"
/Fd"c:\callidusOutput\release\vc80.pdb" /W0 /c /ZI /MP

..\gpc.c
]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000C28924912.rsp /nologo
/errorReport:prompt"
Creating temporary file
"c:\callidusOutput\release\RSP00000D28924912.rsp" with contents
[
/Od /Ob1 /Oi /Ot /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "VISUAL" /D
"_VC80_UPGRADE=0x0710" /D "_AFXDLL" /D "_MBCS" /GF /FD /EHa /MD /Gy
/Zc:forScope- /Yu"all.h" /Fp"c:\callidusOutput\release\Callidus.pch"
/Fo"c:\callidusOutput\release/RollCut_Fitting1.obj"
/Fd"c:\callidusOutput\release\vc80.pdb" /W0 /c /ZI /MP

..\RollCut_Fitting.cpp
]
Creating command line "cl.exe
@c:\callidusOutput\release\RSP00000D28924912.rsp /nologo
/errorReport:prompt"
Output Window Compiling...
cl : Command line error D8016 : '/O2' and '/ZI' command-line options are
incompatible
Results Build log was saved at
"file://c:\callidusOutput\release\BuildLog.htm"
callidusXML - 1 error(s), 0 warning(s)
From: phil oakleaf on
Volker Enderlein wrote:
> Hi Phil,
>
> On 08/09/2009 00:28, phil oakleaf wrote:
>> I'm trying to compile with full debug information
>>
>>
>> In the optimisation I've set
>> Optimisation Disabled (/Od)
>>
>> debug info set to
>> Program Database for Edit & Continue (/ZI)
>>
>>
>> But the compiler complains
>> '/O2' and '/ZI' command-line options are incompatible
>>
>> Any help will be Much appreciated
>>
>> Phil
>
> you can set the optimization switch for both the source file (*.cpp) and
> the project (*.vcproj). And, the settings in the source file will always
> overwrite the settings in the project file.
> I suppose you have set the optimization switch for a separate source
> file and changed it now in the project file. If you can't locate it in
> the Visual Studio GUI you might use your favorite text editor and search
> for /O2 in the project file (which is plain XML).
>
> Cheers Volker
>
that's it

Many thanks
Just have to work through and find them now

Phil