在 FreeBSD 上練習 Objective C...

一樣用 gcc 就可以練習了,首先要先裝 lang/gnustep-base:

cd /usr/ports/lang/gnustep-base; sudo make install clean

裝好後 compile 的兩個階段要對 gcc 加上不同的參數:

-I/usr/local/GNUstep/System/Library/Headers

以及:

-L/usr/local/GNUstep/System/Library/Libraries -lgnustep-base -lobjc

把這些參數整合到 Makefile 裡面就可以練習了。

Leave a Reply

Your email address will not be published. Required fields are marked *