|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
GNUStep makefile issuesWhen 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? Thanks, Mike _______________________________________________ Help-gnustep mailing list Help-gnustep@... http://lists.gnu.org/mailman/listinfo/help-gnustep |
|
|
Re: GNUStep makefile issuesMike 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 _______________________________________________ Help-gnustep mailing list Help-gnustep@... http://lists.gnu.org/mailman/listinfo/help-gnustep |
|
|
Re: GNUStep makefile issuesOn 1 Feb 2009, at 05:26, Mike Schick wrote: > ./shared_obj/prog1.o: In function `main': Hi Mike yes, it's not clear what's wrong ... your code looks good. It must be a problem in your gnustep setup. :-( Speaking of which, you must be using a very old version of gnustep- make ... the 'shared_obj' directory was removed in Summer 2006 - I think that the last release that had it was gnustep-make 1.13.0 (we're now at 2.0.8, and there's a big jump from 1.x to 2.x). ;-) It might be a good idea to try and install a more recent version of gnustep ... it's hard for us to help diagnose problems in very old packages. Thanks > > /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? > > Thanks, > Mike > > > _______________________________________________ > Help-gnustep mailing list > Help-gnustep@... > http://lists.gnu.org/mailman/listinfo/help-gnustep _______________________________________________ Help-gnustep mailing list Help-gnustep@... http://lists.gnu.org/mailman/listinfo/help-gnustep |
| Free embeddable forum powered by Nabble | Forum Help |