[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with compile
From: |
Eric Wasylishen |
Subject: |
Re: Problem with compile |
Date: |
Sun, 25 Sep 2011 10:51:15 -0600 |
Hey,
To use NSLog, NSString, and even constant strings (@""), you need to import the
GNUstep base headers.
Adding:
#import <Foundation/Foundation.h>
to the top of your source.m file should fix the problem. :-)
Eric
On 2011-09-24, at 10:56 AM, Jackie Gleason wrote:
> I am trying to compile the following code
> Environment: Ubuntu 11.04 x64
>
> int main(void)
> {
>
> NSString* s = @"Hello, world!";
> NSLog(s);
> //printf("%s\n", [Test classStringValue]);
> return 0;
> }
>
> I install and Compile GNUstep by checking out the anonymous core, then
> compiling in the order make, base, gui, back. I compile all of them using the
> following command (under sudo shell)..
>
> ./configure --prefix=/usr/GnuStep
> make
> make install
>
> After make I run the following...
> . /usr/GnuStep/share/GNUstep/Makefiles/GNUstep.sh
>
> Finally I create the following GNUMakeFile...
>
> include $(GNUSTEP_MAKEFILES)/common.make
>
> TOOL_NAME = LogTest
> LogTest_OBJC_FILES = source.m
>
> include $(GNUSTEP_MAKEFILES)/tool.make
>
> But when I try running I get the following message...
> ~/Development/Code/personal/GnuStep/helloWorld$ make
> This is gnustep-make 2.6.1. Type 'make print-gnustep-make-help' for help.
> Making all for tool LogTest...
> Compiling file source.m ...
> source.m: In function ‘main’:
> source.m:36:3: error: cannot find interface declaration for ‘NXConstantString’
> make[3]: *** [obj/LogTest.obj/source.m.o] Error 1
> make[2]: *** [internal-tool-all_] Error 2
> make[1]: *** [LogTest.all.tool.variables] Error 2
> make: *** [internal-all] Error 2
>
> the ls for the folder is...
> :/usr/GnuStep# ls
> bin share
>
> Any help would be very appreciated.
> _______________________________________________
> Gnustep-dev mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/gnustep-dev
- Problem with compile, Jackie Gleason, 2011/09/25
- Re: Problem with compile,
Eric Wasylishen <=
- Re: Problem with compile, Richard Frith-Macdonald, 2011/09/25
- Re: Problem with compile, Jackie Gleason, 2011/09/25
- Re: Problem with compile, Jackie Gleason, 2011/09/25
- Re: Problem with compile, Germán Arias, 2011/09/25
- Re: Problem with compile, Richard Frith-Macdonald, 2011/09/26
- Re: Problem with compile, Jackie Gleason, 2011/09/26
- Re: Problem with compile, Richard Frith-Macdonald, 2011/09/26