shadowsocks / shadowsocks-qt5

A cross-platform shadowsocks GUI client
GNU Lesser General Public License v3.0
7.97k stars 2.33k forks source link

Compiling Error with Qt C++ class #776

Open OneTillEnd opened 5 years ago

OneTillEnd commented 5 years ago

When I tried to compile from the source code, I got error message as below. I'm on Ubuntu 16.04 LTS with Qt 5.12.0

xavier@xavier-TM1604:~/shadowsocks-qt5/build$ make -j4 [ 4%] Automatic moc, uic and rcc for target ss-qt5 [ 4%] Built target ss-qt5_automoc [ 8%] Building CXX object src/CMakeFiles/ss-qt5.dir/main.cpp.o /home/xavier/shadowsocks-qt5/src/main.cpp: In function ‘void setupApplication(QApplication&)’: /home/xavier/shadowsocks-qt5/src/main.cpp:29:5: error: ‘setFallbackSessionManagementEnabled’ is not a member of ‘QApplication’ QApplication::setFallbackSessionManagementEnabled(false); ^ src/CMakeFiles/ss-qt5.dir/build.make:62: recipe for target 'src/CMakeFiles/ss-qt5.dir/main.cpp.o' failed make[2]: [src/CMakeFiles/ss-qt5.dir/main.cpp.o] Error 1 CMakeFiles/Makefile2:86: recipe for target 'src/CMakeFiles/ss-qt5.dir/all' failed make[1]: [src/CMakeFiles/ss-qt5.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: *** [all] Error 2

hedingjie commented 5 years ago

I use Qt 5.10.1 and config environment variable as follows: "export LD_LIBRARY_PATH=/opt/Qt5.10.1/5.10.1/gcc_64/lib/". Then I cmake it again and it's successful.

hedingjie commented 5 years ago

maybe you can see following site (but for Chinese): http://www.misteo.top/2018/03/08/Ubuntu%E4%B8%8B%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%E6%9C%80%E6%96%B0%E7%89%88Shadowsocks-Qt5/index.html

OneTillEnd commented 5 years ago

I’m going on well with the app-image, thanks though.

发送自 Windows 10 版邮件https://go.microsoft.com/fwlink/?LinkId=550986应用


发件人: hedingjie notifications@github.com 发送时间: Thursday, March 28, 2019 10:17:31 AM 收件人: shadowsocks/shadowsocks-qt5 抄送: OneTillEnd; Author 主题: Re: [shadowsocks/shadowsocks-qt5] Compiling Error with Qt C++ class (#776)

maybe you can see following site (but for Chinese): http://www.misteo.top/2018/03/08/Ubuntu%E4%B8%8B%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%E6%9C%80%E6%96%B0%E7%89%88Shadowsocks-Qt5/index.html

― You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/shadowsocks/shadowsocks-qt5/issues/776#issuecomment-477418166, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfbsY6Lk6-uS3f8U_rPw1lKYDLB_3wiSks5vbCY7gaJpZM4aJjUJ.

henderypaul commented 5 years ago

/home/xxx/Software/shadowsocks-qt5-master/src/main.cpp:29:5: error: ‘setFallbackSessionManagementEnabled’ is not a member of ‘QApplication’ QApplication::setFallbackSessionManagementEnabled(false); ^ src/CMakeFiles/ss-qt5.dir/build.make:62: recipe for target 'src/CMakeFiles/ss-qt5.dir/main.cpp.o' failed make[2]: [src/CMakeFiles/ss-qt5.dir/main.cpp.o] Error 1 make[2]: 正在等待未完成的任务.... CMakeFiles/Makefile2:86: recipe for target 'src/CMakeFiles/ss-qt5.dir/all' failed make[1]: [src/CMakeFiles/ss-qt5.dir/all] Error 2 Makefile:127: recipe for target 'all' failed make: [all] Error 2

http://www.misteo.top/2018/03/08/Ubuntu%E4%B8%8B%E7%BC%96%E8%AF%91%E5%AE%89%E8%A3%85%E6%9C%80%E6%96%B0%E7%89%88Shadowsocks-Qt5/index.html can not solve the problem