c – 与libQt5Core的联系

c – 与libQt5Core的联系,第1张

概述我在线安装程序安装了Qt5.4(在ubuntu 14上工作).我正在尝试编译我的c源并链接到libQt5Core,但是ld抛出一个错误: makeg++ -Wall test.o Party.o Communication.o FileParser.o PeerConnection.o ServerModule.o Utilities.o -o party -g -L/home/bush/Qt/ 我在线安装程序安装了Qt5.4(在ubuntu 14上工作).我正在尝试编译我的c源并链接到libQt5Core,但是ld抛出一个错误:
makeg++ -Wall test.o Party.o Communication.o fileParser.o PeerConnection.o ServerModule.o UtilitIEs.o -o party -g -L/home/bush/Qt/5.4/gcc_64/lib -L/usr/lib/x86_64-linux-gnu/ -lQt5Core -lboost_system -lpthread/usr/bin/ld: warning: libicui18n.so.53,needed by /home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so,not found (try using -rpath or -rpath-link)/usr/bin/ld: warning: libicuuc.so.53,not found (try using -rpath or -rpath-link)/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_setMillis_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_fromUnicode_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_get_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_inDaylightTime_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_open_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_countAvailable_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_countAliases_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `u_errorname_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openCountryTimeZones_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `u_strtoupper_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getDefaultname_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `uenum_next_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_strcoll_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getMaxCharSize_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getAvailablename_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_open_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getTimeZonedisplayname_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_toUnicode_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `uenum_close_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_getSortKey_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getAlias_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_close_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_setAttribute_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_close_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openTimeZoneIDEnumeration_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_openTimeZones_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_getStandardname_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucol_close_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_comparenames_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_clone_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `u_strTolower_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getDefaultTimeZone_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_open_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucnv_setSubstChars_53'/home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so: undefined reference to `ucal_getDSTSavings_53'collect2: error: ld returned 1 exit statusmake: *** [party] Error 1

我的makefile是:

CPPFLAGS=-g -c --std=c++0x -I/usr/include -I/home/bush/Qt/5.4/gcc_64/include -I/home/bush/Qt/5.4/gcc_64/include/QtCore -I/usr/include/boostLDFLAGS=-g -L/home/bush/Qt/5.4/gcc_64/lib -L/usr/lib/x86_64-linux-gnu/ -lQt5Core -lboost_system -lpthreadall:partyparty:test.o Party.o Communication.o fileParser.o PeerConnection.o ServerModule.o UtilitIEs.o    g++ -Wall $^ -o party $(LDFLAGS)test.o:test.cpp    g++ $(CPPFLAGS) test.cppParty.o:Party.cpp    g++ $(CPPFLAGS) Party.cppCommunication.o:Communication.cpp    g++ $(CPPFLAGS) Communication.cppfileParser.o:fileParser.cpp    g++ -fPIC $(CPPFLAGS) fileParser.cppPeerConnection.o:PeerConnection.cpp    g++ $(CPPFLAGS) PeerConnection.cppServerModule.o:ServerModule.cpp    g++ $(CPPFLAGS) ServerModule.cppUtilitIEs.o:UtilitIEs.cpp    g++ $(CPPFLAGS) UtilitIEs.cpp
解决方法 我遇到了同样的问题.但是我通过这个代码找到我的出路.
export  LD_liBRARY_PATH=/usr/local/Qt/5.5/gcc_64/lib:$LD_liBRARY_PATH
总结

以上是内存溢出为你收集整理的c – 与libQt5Core的联系全部内容,希望文章能够帮你解决c – 与libQt5Core的联系所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1234350.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-06
下一篇2022-06-06

发表评论

登录后才能评论

评论列表(0条)

    保存