compiler macro that define operating system

Tom Browder tom.browder@gmail.com
Thu Sep 16 21:10:00 GMT 2010


On Thu, Sep 16, 2010 at 15:59, gagan1 <gagan2172@yahoo.com> wrote:
> Tom Browder wrote:
>> On Wed, Sep 15, 2010 at 16:12, gagan1 <gagan2172@yahoo.com> wrote:
>>>
>>> chaps,
>>>                I am using gcc to compile a old peaice of code. that has
>>> so
>>> many header file with
>>> #ifdef WIN_OS
>>>   slls
>>> #elseif UNIX_OS
>>>  abs
>>> #else
>>>   #error missing os
>>
>> Without knowing anything else, and assuming you're on some kind of
>> unixish system, I suggest adding "-DUNIX_OS" to your compile flags.
...
> Thanks Tom . It works -)

Great!  Now you can zero in on the other changes that may needed to
bring the old code into the modern C/C++ era.

Cheers,

-Tom

Thomas M. Browder, Jr.
Niceville, Florida
USA



More information about the Gcc-help mailing list