在Debian中8的源代碼/source/procps-3.3.9/lib/fileutils.c線38是: 字符常量* write_error = _( 「寫入錯誤」);_(「寫入錯誤」)是什麼意思?
我感到困惑的_(「寫入錯誤」)的一部分。谷歌顯示了變量命名約定或庫保留名稱的結果,但是什麼時候_位於=的右側和()引號字符串之前。
我也把這個行成一個簡單的測試程序,然後作爲唯一有用的線了編譯失敗說:
test.c:5:20: warning: implicit declaration of function ‘_’ [-Wimplicit-function-declaration] char const *str = _("test string"); ^ test.c:5:20: warning: initialization makes pointer from integer without a cast [-Wint-conversion] /tmp/cczQpqTh.o: In function `main': test.c:(.text+0x15): undefined reference to `_' collect2: error: ld returned 1 exit status
有誰知道什麼_(" ")
格式的意思嗎?
'_'是一個完全合法的_name_。 –