Solved

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

Posted on 2003-10-28
3
1,405 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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 viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

705 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