Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

可以说说编译的时候注意事项吗和步骤吗, #5

Open
zheniantoushipashi opened this issue Dec 1, 2014 · 12 comments
Open

Comments

@zheniantoushipashi
Copy link

可以说说编译的时候注意事项吗和步骤吗, 编译报错, ubuntu 64 位

编译的时候 👎 error: mywindow.o: undefined reference to symbol 'XShapeCombineRectangles'
是怎么回事啊, 缺少引用,该怎么解决

@MidoriYakumo
Copy link

不知为何少了 -lXext

我最后手动
clang++ -ccc-gcc-name g++ -Wl,-rpath-link,/usr/lib64 -o QQStars main.o mynetworkaccessmanagerfactory.o utility.o mywindow.o qqstars.o systemtrayicon.o mysvgview.o myimage.o mymessagebox.o myhttprequest.o qqiteminfo.o downloadimage.o texteditplaygif.o qxtglobalshortcut.o myshortcut.o qxtglobalshortcut_x11.o qrc_images.o qrc_other.o qrc_faces.o moc_qxtglobalshortcut.o moc_myshortcut.o moc_mynetworkaccessmanagerfactory.o moc_utility.o moc_mywindow.o moc_qqstars.o moc_systemtrayicon.o moc_mysvgview.o moc_myimage.o moc_mymessagebox.o moc_myhttprequest.o moc_qqiteminfo.o moc_downloadimage.o moc_texteditplaygif.o -lX11 -lQt5Quick -L/usr/lib64 -lQt5WebKitWidgets -lQt5Svg -lQt5Qml -lQt5WebKit -lQt5X11Extras -lQt5Widgets -lQt5Sql -lQt5Concurrent -lQt5Network -lQt5Gui -lQt5Core -lGL -lpthread -lXext
解决的

@vinllen
Copy link

vinllen commented Dec 2, 2014

same problem

@vinllen
Copy link

vinllen commented Dec 2, 2014

解决方法如下:
修改Makefile下第21行 最后添加:-Wl,--no-as-needed,-lXext
因为XShapeCombineRectangles存在于libXext.a中而不是libXext.so

修改后还会有第二个cp的问题,直接在Makefile中删除就好了

@zheniantoushipashi
Copy link
Author

我编译成功了,但是运行起来会有一些问题, 比如没有图片,

@zheniantoushipashi
Copy link
Author

file:///root/Qt/install/bin/build-QQStars-unknown-Debug/qml/MainPanel/ListPage/GroupList.qml:70:13: QML MyImage: Binding loop detected for property "source"

@arjide
Copy link
Collaborator

arjide commented Dec 15, 2014

回复:zheniantoushipashi 。那个问题最新代码已经解决了

@wgliang
Copy link

wgliang commented Dec 30, 2014

楼主有详细的注释版代码吗?

@arjide
Copy link
Collaborator

arjide commented Dec 30, 2014

注释全在这了,没有更详细得了

@wgliang
Copy link

wgliang commented Jan 1, 2015

error: mywindow.o: undefined reference to symbol 'XShapeCombineRectangles'
libX11.so.6: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status,
ubuntu14.04下Qt Creator,一直出现这个错误,有什么有效的解决方案吗?我查了查网上说的解决办法都没效果?

这是楼上的解决办法:解决方法如下:
修改Makefile下第21行 最后添加:-Wl,--no-as-needed,-lXext
因为XShapeCombineRectangles存在于libXext.a中而不是libXext.so

修改后还会有第二个cp的问题,直接在Makefile中删除就好了

@yfyang86
Copy link

ubuntu 14.04 下QtQuick.Controls版本号改成1.1貌似才能运行,否则提示找不到。

#sudo apt-get install libqt5qml-quickcontrols qtdeclarative5-window-plugin libqt5x11extras5-dev qtdeclarative5-private-dev
for iii in `grep "QtQuick.Controls" -nr . | awk -F: '{print $1}'`;
do
    sed 's/QtQuick.Controls 1.2/QtQuick.Controls 1.1/g' $iii > $iii
done

qmake 后如上改Makefile,然后make

再再然后,无论怎么改都会出现下面的错误:

QxtGlobalShortcut failed to register: "Ctrl+Alt+L" 
"设置Ctrl+Alt+L热键出错" 
QQmlComponent: Component is not ready
QQCommand:加载登录窗口失败, "qrc:/qml/Login/main.qml:158 Type LoginPage unavailable
qrc:/qml/Login/LoginPanel/LoginPage.qml:1 Expected token `numeric literal'
qrc:/qml/Login/LoginPanel/LoginPage.qml:1 Expected a qualified name id
" 

@MidoriYakumo
Copy link

楼上不该更新软件吗

@yfyang86
Copy link

我用的是14.04源里面默认的版本。更新工具链是很麻烦的,而且既然1.1可以用,只能找别的问题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants