|
From: | Robert Jones |
Subject: | Re: compile problems |
Date: | Mon, 22 Nov 2004 01:33:29 -0500 |
User-agent: | Mozilla Thunderbird 0.9 (Windows/20041103) |
Nicolas Roard wrote:
Le 21 nov. 04, à 18:18, Adam Fedor a écrit :On Nov 21, 2004, at 12:54 AM, Robert Jones wrote:Hello, I'm having trouble compiling simple Objective-C programs using Gnustep. I'm using the most recent release of Gnustep on a Win2000 system. Below is an example of my troubles:rjones21@JONES ~/projects $ gcc -L/c/GNUstep/System/Tools -lobjc fraction.m main.m -o fraction.exefraction.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header file main.m:1:2: warning: #import is obsolete, use an #ifndef wrapper in the header file C:/DOCUME~1/jareth/LOCALS~1/Temp/ccglaaaa.o(.data+0x134):fraction.m: undefined reference to `__objc_class_name_NSObject'Try putting the -lobjc at the end of the line.I think he just didn't link to Foundation (where I will expect NSObject to be)
Thanks to you both for the help. I typed this in: gcc fraction.m main.m -o fraction.exe -lobjc -lgnustep-baseIt compiled correctly:) I had been trying to get it to compile for two months, having decided that my first copy of Gnustep was somehow corrupted during download(has happened more than I like to think about), I waited for the next stable release. By this time I started to use Usenet more and went looking for this newsgroup. Glad I did. Now I can continue to learn Objective-C.
-- Robert Jones robertjones21@HotPOP.com
[Prev in Thread] | Current Thread | [Next in Thread] |