954,193 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

1 error compiling...

Hi I'm creating an application and in DEBUG mode I have zero errors, but when I switch to RELEASE I have this error:

--------------------Configuration: ipfix - Win32 Release--------------------
Compiling...
Command line error D2016 : '/ZI' and '/O2' command-line options are incompatible
Error executing cl.exe.


Can you help me please,

Thanks, Regards

gampalu
Junior Poster in Training
78 posts since Mar 2006
Reputation Points: 21
Solved Threads: 0
 

It's just what the error says. You can't have that particular debugging switch active when optimizing for speed. Under your project settings, the general tab in C/C++, you can change Debug Information Format to disabled.

Dogtree
Posting Whiz in Training
233 posts since May 2005
Reputation Points: 35
Solved Threads: 3
 

Thanks :)

gampalu
Junior Poster in Training
78 posts since Mar 2006
Reputation Points: 21
Solved Threads: 0
 

Check your compiler optimisation switches in project properties or something (I havn't used VC++ ide ever but I guess they're in there somewhere)

If you look here:
http://msdn2.microsoft.com/en-us/library/fwkeyyhe.aspx

You will see that command line switch /ZI means include debugging symbols

/O2 means compile 'fast' code

They are obviously mutualy exclusive you can't compile lots of debug code in AND have fast code!

hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You