Solved

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

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Written by John Humphreys C++ Threading and the POSIX Library This article will cover the basic information that you need to know in order to make use of the POSIX threading library available for C and C++ on UNIX and most Linux systems.   [s…
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 learn how to clear a vector as well as how to detect empty vectors in C++.

737 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