Http://chchwy.blogspot.com/2010/05/linux-objective-c.html
How to compile objective-C Programs on Linux
1. Sort the following packages in sequence:
Sudo apt-get-y install build-essential
Sudo apt-get-y install gnustep
Sudo apt-Get install gobjc
Sudo apt-Get install gnustep-make
Sudo apt-Get install libgnustep-base-Dev
After security, we still need a command to renew the objc. Since this command needs to be called once every time it runs terminal, it is best to add it to. bashrc, and each login will automatically open the line.
./Usr/share/gnustep/makefiles/gnustep. Sh
Okay, now we have something to do. Now we will introduce the first objc program.
// Hello. m
# Import <Foundation/Foundation. h>
Int main (INT argc, const char * argv [])
{
NSAID utoreleasepool * Pool = [[NSAID utoreleasepool alloc] init];
Nslog (@ "Hello obj-C! ");
[Pool drain];
Return 0;
}
Zookeeper:
GCC 'gnustep-config -- objc-flags '-I/usr/include/gnustep-lgnustep-base hello. m
Congratulations! Your first objc program is complete.
Find/-name Foundation. h> 1.txt