cht電腦資訊gcin已解決問題
adm Find login register

gcin 1.4.7 pre22 編譯失敗

本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
1subject: gcin 1.4.7 pre22 編譯失敗Promote 0 Bookmark 02010-04-14quote  

gcin-im-client.cpp:14:2: error: #else without #if
gcin-im-client.cpp:17:2: error: #endif without #if
gmake[1]: *** [.depend] Error 1
gmake[1]: Leaving directory `/tmp/gcin-1.4.7.pre22/im-client'
make: *** [im-client/libgcin-im-client.so] Error 2

edt1023:/tmp/gcin-1.4.7.pre22$ gcc --version
gcc (GCC) 4.2.4

glibc-2.7

Zenwalk 5.2

 


caleb
joined: 2007-09-22
posted: 630
promoted: 134
bookmarked: 90
2subject: gcin 1.4.7 pre22 編譯失敗Promote 0 Bookmark 02010-04-14quote  
im-client/gcin-im-client.cpp 檔頭有 BOM, 拿掉就可以了。
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
3subject: gcin 1.4.7 pre22 編譯失敗Promote 0 Bookmark 02010-04-14quote  

caleb
im-client/gcin-im-client.cpp 檔頭有 BOM, 拿掉就可以了。

哇咧,還真的是有 bom。你是怎麼發現的?

eliu @_@


eliu

joined: 2007-08-09
posted: 11478
promoted: 617
bookmarked: 187
新竹, 台灣
4subject: Promote 0 Bookmark 02010-04-14quote  
gcc 4.4.1 可以處理 BOM
本人已不在此站活動

joined: 2007-09-19
posted: 4946
promoted: 325
bookmarked: 206
歸隱山林
5subject: Promote 0 Bookmark 02010-04-21quote  

vim -b file

就可以看得見 bom,把他刪除,存檔就成了。或

cat file | od -t x1 | grep 'ef bb bf'  → 檢查檔案是否含 UTF-8 BOM

cut -b 4- file > file-nobom → 去除 BOM

或者也有人寫了專用工具 bomstrip:

 http://www.xs4all.nl/~mechiel/projects/bomstrip/

再或者,你想練一下 perl/python/ruby/php,那就寫一小段 script 處理一下。


edited: 3

cht電腦資訊gcin已解決問題
adm Find login register
views:12772