最近寫完代碼提交到服務(wù)器上編譯時出現(xiàn)了以下的編譯錯誤掏婶,各種搜索嘗試無果,關(guān)鍵問題還不清晰潭陪,一怒之下,直接在linux上重新建個文件重新寫過依溯,發(fā)現(xiàn)一摸一樣的代碼竟然。黎炉。枝秤。
編譯通過了慷嗜。。庆械。過了薇溃。缭乘。。了堕绩。。奴紧。
唯一的區(qū)別就是原先是在win下用si創(chuàng)建的文件特姐,一個是直接在linux下創(chuàng)建的绰寞。
估計是文本格式的影響?
In file included from /data/home/dailybuild/trunk/src/include/precompiled_header.h:4,
from check_c.h:11,
from check_c.cpp:8:
/usr/include/unistd.h:28: error: expected constructor, destructor, or type conversion before ‘extern’
In file included from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/new:40,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/ext/new_allocator.h:33,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/x86_64-redhat-linux/bits/c++allocator.h:34,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/bits/allocator.h:48,
from /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/deque:62,
from /data/home/dailybuild/trunk/src/include/precompiled_header.h:20,
from check_c.h:11,
from check_c.cpp:8:
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../../include/c++/4.4.6/exception:35: error: expected declaration before end of line