I am new to this iPhone. So I installed the GNUstep compiler and I imported one small program. Now I want to compile this and execute the code... I did this by using the code:
gcc -o hello hello.m -I/c/GNUstep/开发者_如何学编程GNUstep/System/Library/Headers \
-L /c/GNUstep/GNUstep/System/Library/Libraries -lobjc -lgnustep-base \
-fconstant-string-class=NSConstantString
but it is giving the error as
1./GNUstep/GNUstep/system/library/libraries:permission denied
2.ld.exe : cannot find -lobjc
3.ld.exe : cannot find -lgnustep-base-fconstant-string-class=NSConstantString
collect2:id returned 1 exit status
Please help me anyone.. have I too add any new libraries to this?
Try using this command:
$ gcc `gnustep-config --objc-flags` -o hello hello.m -L C:/GNUstep/GNUstep/Syst
em/Library/Libraries -lobjc -lgnustep-base
You can simple check out my you tube tutorial about that : here
I use GNUstep GORM to make a Objective-C project. The GORM will make a GNUmakefile automatically. If you want to command line style for compile the project, open Shell (you may close the GORM), change to the project directory using cd command, and type make. The GNUstep will compile the project (followed the GNUmakefile). There is a simple project by Yen-Ju Chen at http://www.nongnu.org/gstutorial/en/ch10.html.
精彩评论