2005年01月26日
My _vimrc
這是我自定的 vimrc 內容。
備份用。不知道 VIM 是什麼東西的可以跳過。 :p
" Begin with my personal settings!! " " === 1. Don't wrap if the text is too long! set nowrap " " === 2. Always use spaces instead of Tabs. set tabstop=4 set shiftwidth=4 set expandtab " " === 3. Yes! I'm a C programmer!! set cindent " " === 3. Highlights in searching is anoying... set nohlsearch " " === 4. Let the screen looks nicer! colorscheme darkblue " " 5. No backups, thank you. I know what I'm doing! set nobackup " " That's it!! " |
Posted by cclo at 20:06 | Comments (0)
2004年12月31日
在 Windows 下編譯 Objective-C 注意事項
這篇文章將會介紹如何在 MS-Windows 系統中利用 GNUstep 編譯 Objective-C 的程式。非技術人員,或是對 Objective-C 沒有興趣的人可以跳過。 ^^;
- 使用 msys 編譯的方法:
- 首先至 GNUstep 的網站下載最新的 installer。(下載版號最新的執行檔就可以了)
- 安裝 installer。(以下說明假設 GNUstep 是裝在 C:\GNUstep 這個目錄下)
- 開啟 msys。
- 在 home directory 下開一個叫做 .profile 的檔案,裡面放這兩行設定:
export OBJC_INCLUDE_PATH=/c/GNUstep/System/Library/Headers/ export LIBRARY_PATH=/c/GNUstep/Library/Libraries/
說明:這兩行是在設定環境變數,分別是設定 Objcective-C 的 header files 的位置,以及 library 的位置。GCC 會根據這兩個路徑去搜尋 header files & libraries。 - 重新開啟 msys,或是在命令列執行下面的命令:
source ~/.profile
- 現在你可以編譯了。記得在 link 的時候必須指定要 link objc 和 gnustep-base 等兩個 libraries:
gcc -o test.exe test.m -lobjc -lgnustep-base
- 使用 cmd.exe(命令提示字元)編譯及執行編譯結果:
- 依據前面的步驟 1. 2. 安裝 GNUstep 套件。
- 「開始→控制台→系統→進階→環境變數」(以 Windows XP 為例)
-
在 Path 環境變數中,增加以下兩個目錄:
C:\GNUstep\Development\msys\1.0\mingw\bin C:\GNUstep\System\Tools
前者是為了能執行 gcc,後者是為了 gnustep-base.dll。(當然,把 gnustep-base.dll 放到 \Windows\System\ 下面也可以) - 增加一個環境變數 OBJC_INCLUDE_PATH,其值為 C:\GNUstep\System\Library\Headers。
-
增加一個環境變數 LIBRARY_PATH,其值為 C:\GNUstep\System\Library\Libraries。
增加上述這兩項的理由和前面 msys 的 4. 相同。
- 現在你也可以在 cmd 下編譯了,語法和 msys 下相同。
- 參考文件:
- comp.lang.objective-C FAQ -- David Stes
- GCC Online Manual -- Free Software Foundation
Posted by cclo at 21:35 | Comments (0)