Solved

"Command line error D2016 : '/O1' and '/GZ' command-line options are incompatible"

Posted on 2003-10-28
3
1,390 Views
Last Modified: 2007-12-19
When I try to compile the following example, I get this error :
"Command line error D2016 : '/O1' and '/GZ' command-line options are incompatible"
************
#include <stdio.h>
main()
{
    (void) printf("Hello World\n");
    return (0);

}
************

I allready tried to change the debug info ('/GZ'), but still get this error (somethimes with '/ZI',...).
I'm especially interested in the minimize size optimalization (/O1). How can I fix this error ??

0
Comment
Question by:teuntje
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 60 total points
ID: 9635459
>>How can I fix this error ??

Not at all - debug info and optimizations are mutually exclusive. If you need "smallest code" optimization, remove the debug info switch and vice-versa.
0
 
LVL 2

Author Comment

by:teuntje
ID: 9635943
Thanks for your reply.I'm using Vc++ 6.0. I diabled debugging under project-settings-general, and erased the _DEBUG in "preprocessor definitions", but I still have the same error. Do you happen to know what else I should do ???
0
 
LVL 2

Author Comment

by:teuntje
ID: 9637760
found it myself.
thanks, jkr.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now