Solved

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

Posted on 2003-10-28
3
1,395 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C Language combined operators 28 106
PDF library for Delphi 2 103
computer science syllabus 3 69
White board coding practice 3 77
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
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…

943 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

11 Experts available now in Live!

Get 1:1 Help Now