Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!well!gurgle From: gurgle@well.sf.ca.us (Pete Gontier) Newsgroups: comp.sys.mac.programmer Subject: Re: Question for THINK C gurus Message-ID: <23979@well.sf.ca.us> Date: 2 Apr 91 03:42:37 GMT References: <3142@murtoa.cs.mu.oz.au> Organization: cellular Lines: 32 In article <3142@murtoa.cs.mu.oz.au> rob@cs.mu.oz.au (Robert Wallen) writes: >If I am using Think-C, is there some way I can tell which mode of object is >being produced? i.e. is there some sort of > >#if defined(APPL) || defined(DESKACC) || defined(DRIVER) || defined(RSRC) >#endif > >that lets me know whats selected in the Project Type window? Page 442 of the >Think manual would lead me to believe not but I can always hope??? As far as I know, the answer is no. However, there is hope. You can use the pre-processor to force yourself to define a symbol for the project type. Here's what I use: #define __STAND_ALONE__ /* project type */ #if defined __APPLICATION__ # define __GRR__ A5 #elif defined __DRIVER__ # define __GRR__ A4 #elif defined __STAND_ALONE__ # define __GRR__ A4 #else You need to define *ONE* of the above project types. #endif The last line there forces a compiler error. If you ever get it, the message explains why. -- Pete Gontier, gurgle@well.sf.ca.us Software Imagineer, Kiwi Software, Inc.