luran
-
2012-04-01
- status: open --> closed-fixed
原来可能 unistd.h 通过了其它头文件包含进来,在旧版 GCC 中可编译通过。但在 GCC 4.7 中 main.cpp 编译不通过了,要显式包含 unistd.h。这是我在 Fedora 中用的 patch:
http://cheeselee.fedorapeople.org/qterm-0.5.12-gcc-4.7.patch
用到的函数一般都应该直接 include (标准上)直接提供那些函数的头文件,而不要依靠其它头文件把实际想要的头文件附带 include 进来。不要以为编译通过了就不注意了。