Mail Archives: djgpp/1995/02/03/20:42:31
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 -