DapperX / project-lemon

Automatically exported from code.google.com/p/project-lemon
0 stars 0 forks source link

Archlinux x86_64编译失败 #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
g++ -c -m64 -pipe -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector 
--param=ssp-buffer-size=4 -D_FORTIFY_SOURCE=2 -Wall -W -D_REENTRANT 
-DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED 
-I/usr/share/qt/mkspecs/linux-g++-64 -I. -I/usr/include/QtCore 
-I/usr/include/QtNetwork -I/usr/include/QtGui -I/usr/include -I. -I. -o 
qtlocalpeer.o qtsingleapplication/qtlocalpeer.cpp
qtsingleapplication/qtlocalpeer.cpp: 
在构造函数‘QtLocalPeer::QtLocalPeer(QObject*, const QString&)’中:
qtsingleapplication/qtlocalpeer.cpp:96:54: 错误:‘::getuid’未被声明
qtsingleapplication/qtlocalpeer.cpp:96:54: 附注:建议的替代:
In file included from ./qtlockedfile/qtlockedfile_unix.cpp:42:0,
                 from qtsingleapplication/qtlocalpeer.cpp:60:
/usr/include/unistd.h:697:16: 附注:  ‘QtLP_Private::getuid’
make: *** [qtlocalpeer.o] 错误 1

编译失败的部分编译信息如上
qt版本:4.8.2
gcc版本:4.7.1

Original issue reported on code.google.com by linmx0...@gmail.com on 3 Aug 2012 at 2:20

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
在网上查了一下,这段代码是有这个bug。
在qtlocalpeer.h的include加上下面的代码:
#if defined(Q_OS_UNIX)
#include <unistd.h>
#endif

Original comment by Blue.Boy.in.China@gmail.com on 11 Aug 2012 at 5:26