help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUStep makefile issues


From: Fred Kiefer
Subject: Re: GNUStep makefile issues
Date: Sun, 01 Feb 2009 16:38:42 +0100
User-agent: Thunderbird 2.0.0.19 (X11/20081227)

Mike Schick wrote:
> When trying to use the GNUmakefile i keep getting the following error:
> 
> Making all for tool prog1...
>  Compiling file prog1.m ...
>  Linking tool prog1 ...
> ./shared_obj/prog1.o: In function `main':
> /home/mschick/Progs/prog1.m:6: undefined reference to `NSLog'
> ./shared_obj/prog1.o:(.data.rel+0x0): undefined reference to 
> `__objc_class_name_NSAutoreleasePool'
> collect2: ld returned 1 exit status
> make[1]: *** [shared_obj/prog1] Error 1
> make: *** [prog1.all.tool.variables] Error 2
> 
> Here is my code:
> 
> #import <Foundation/Foundation.h>
> 
> int main(int argc, const char * argv[])
> {
>         NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
>         NSLog(@"Programming is fun!!!!");
> 
>         [pool release];
>         return 0;
> }
> 
> 
> Here is my GNUmakefile:
> 
> include $(GNUSTEP_MAKEFILES)/common.make
> 
> TOOL_NAME = prog1 
> prog1_OBJC_FILES = prog1.m 
> 
> include $(GNUSTEP_MAKEFILES)/tool.make
> 
> 
> I am new to GNUSTEP and im not sure if I have the make file setup 
> right.....could you please help me?
> 

I just compiled and run you program and it works fine:

2009-02-01 16:34:41.688 prog1[28138] Programming is fun!!!!

So the problem is in something you didn't show us. Did you source the
GNustep.sh file before compiling?

Could you please re-run make with full output switched on and report the
output on this list?

make messages=yes




reply via email to

[Prev in Thread] Current Thread [Next in Thread]