[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
YellowDog Linux on G4 compiling basic ObjC program
From: |
Vladimir Leven |
Subject: |
YellowDog Linux on G4 compiling basic ObjC program |
Date: |
Thu, 03 Jun 2004 15:19:18 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.2.1) Gecko/20030228 |
Hi,
I can't figure out how to compile a simple ObjC program on Yellow Dog Linux. My
main.m looks like
#import <Foundation/Foundation.h>
int main(int argc, const char *argv[]) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
NSLog(@"all tests passed");
[pool release];
return 0;
}
and my GNUmakefile like
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME=mtest
string_OBJC_FILES = mtest.m
include $(GNUSTEP_MAKEFILES)/tool.make
make produces:
Making all for tool mtest...
Linking tool mtest ...
/usr/lib/crt1.o(.rodata+0x4): undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [shared_obj/mtest] Error 1
make: *** [mtest.all.tool.variables] Error 2
What am I doing wrong?
And actually, I would be even more interested in how to build my test program
directly with gcc. I'm considering using ObjC/GnuStep-Base for embedded
development and would prefer not to use the supplied makefiles.
Thanks for any help!
System:
- Apple G4
- gcc (GCC) 3.4.0
- YellowDog 3
- Latest RPMs for YellowDog of GNUStep downloaded and installed
- YellowDog Linux on G4 compiling basic ObjC program,
Vladimir Leven <=