www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/03/20:42:31

From: Robert Lang <rrl AT fnbc DOT com>
Date: Fri, 3 Feb 95 16:52:48 -0600
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: List archive & #import
Reply-To: rrl AT fnbc DOT com

Hello All,

Is there a list archive somewhere?  Hate to ask questions that have already  
been pondered....

Also, I seem to be having a bit of trouble with the #import directive when  
compiling objective-c programs.  Is objective-c fully supported?

Basically, this does not compile: (All of the latest pgm's and maints from  
SimTel w/cmd: gcc -Wno-import -o test test.m -lobjc)

---------------cut test.m------------------
#import <stdlib.h>
#import <objc/Object.h>

int main(int argc,char**argv)
{
    Object * theObject = [[Object alloc] init];

    printf("The Object name is : %s\n",[theObject name]);

    exit(0);
}
----------------end test.m------------------

I receive errors saying that Object is undeclared.  If I change to #include,  
things work quite well.  I know this sounds like a case of "If it hurts,  
don't do it", but #import is the standard in my NeXT programs, and I'd like  
to be consistent.

Thanks in Advance,

Robert Lang
rrl AT fnbc DOT com     (NeXTMail, MIME ok)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019