1. 程式人生 > >linux gcc編譯undefined reference to `stricmp'問題

linux gcc編譯undefined reference to `stricmp'問題

最近gcc編譯遇到這樣的問題:undefined reference to `stricmp'.

查了下,stricmp是Windows特有函式。

解決方法:

stricmp是Microsoft's compilers/libraries.linux下用strcasecmp代替。

問題解決。

有興趣不防看看/usr/include/string.h檔案,沒有stricmp宣告。

參考:

http://stackoverflow.com/questions/5918697/undefined-reference-to-stricmp