discuss-gnustep
[Top][All Lists]
Advanced

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

Re: Re: One problem for gcc compile object-c on windows 7


From: lbwlh
Subject: Re: Re: One problem for gcc compile object-c on windows 7
Date: Wed, 3 Sep 2014 10:27:30 +0800 (CST)



> -----Original E-mail-----
> From: "Richard Frith-Macdonald" <address@hidden>
> Sent Time: 2014-9-2 19:49:38
> To: address@hidden
> Cc: address@hidden, address@hidden
> Subject: Re: One problem for gcc compile object-c on windows 7
> 
> On 2 Sep 2014, at 06:56, address@hidden wrote:
> > 
> > Hi all,
> > 
> > I am a newbie for object-c, I am study object-c on windows 7, as I found 
> > http://www.gnustep.org/experience/Windows.html is very useful for me, so I 
> > setup the environment as it said: install MinGW and GNUstep Core, then I 
> > can use gcc to compile the first object-c program which do not include any 
> > foundation header files, like <Foundation/NSObject.h>.
> > 
> > But the problem is that I can not write any code actually, as gcc can not 
> > find all of foundation header files.
> > If my code include <Foundation/NSObject.h>, gcc will pop out error like: 
> >  fatal error, Foundation/Foundation.h: No such file or directory
> >  compilation terminated.
> > 
> > Does any body can help me for this problem? Thank you very much.
> > 
> > BTW, I have installed Cygwin before install MinGW and GNUstep Core, does it 
> > conflict with MinGW?
> 
> How are you building your code?  You need to use gnustep-make to do that.
> See http://www.gnustep.it/nicola/Tutorials/WritingMakefiles/ for a tutorial 
> on how to get started.

Thanks for your reply.

I was using gcc directly to compile my program:
1) compile main.m to main.o : 
gcc -fconstant-string-class=NSConstantString -c main.m -I 
/GNUstep/System/Library/Headers 
2) Fraction.m to Fraction.o : 
gcc -c Fraction.m -I /GNUstep/System/Library/Headers 
3) compile *.o to main (actually is main.exe) 
gcc -o main main.o Fraction.o -L /GNUstep/System/Library/Libraries/ -lobjc 
-lgnustep-base

But the first command terminated me with those error. But I can see all *.h 
file under /GNUstep/System/Library/Headers directory.

--
Best wishes
(CN:李兵,Li bing)--------(EN:EricLee)
MAIL:lbwlh (AT) mail.ustc.edu.cn
TEL:18600893664
QQ:375922885





reply via email to

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