Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-10-28
3
Medium Priority
?
1,427 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 240 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

Tech or Treat!

Submit an article about your scariest tech experience—and the solution—and you’ll be automatically entered to win one of 4 fantastic tech gadgets.

Question has a verified solution.

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

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
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.

636 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