分类: iOS平台
2013-03-30 10:20:02
#echo 'export LIBRARY_PATH=/usr/lib/GNUstep/System/Library/Libraries' >> ~/.profile |
2 | #echo 'export OBJC_INCLUDE_PATH=/usr/include/GNUstep/Headers' >> ~/.profile |
3 | #source ~/.profile |
然后执行GNUstep.sh的脚本,自动加载其他环境PATH:
1 | #chmod +x /usr/share/GNUstep/Makefiles/GNUstep.sh |
2 | #source /usr/share/GNUstep/Makefiles/GNUstep.sh |
也加入.profile文件, 以便用户登陆系统时加载
1 | #echo 'source /usr/share/GNUstep/Makefiles/GNUstep.sh' >> ~/.profile |
3. 安装gobjc
sudo apt-get install gobjc
4. 测试程序
#importint main( int argc, const char *argv[] ) { printf( "hello world\n" ); return 0; }
gcc -o hello hello.m -l objc