与 libQt5Core 的链接

2024-02-20

我使用在线安装程序安装了 Qt5.4(在 ubuntu 14 上运行)。我正在尝试编译我的 C++ 源代码并链接到 libQt5Core 但 ld 抛出错误:

make
g++ -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, needed by /home/bush/Qt/5.4/gcc_64/lib/libQt5Core.so, 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 status
make: *** [party] Error 1

我的生成文件是:

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/boost
LDFLAGS=-g -L/home/bush/Qt/5.4/gcc_64/lib -L/usr/lib/x86_64-linux-gnu/ -lQt5Core -lboost_system -lpthread

all:party

party: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.cpp
Party.o:Party.cpp
    g++ $(CPPFLAGS) Party.cpp
Communication.o:Communication.cpp
    g++ $(CPPFLAGS) Communication.cpp
FileParser.o:FileParser.cpp
    g++ -fPIC $(CPPFLAGS) FileParser.cpp
PeerConnection.o:PeerConnection.cpp
    g++ $(CPPFLAGS) PeerConnection.cpp
ServerModule.o:ServerModule.cpp
    g++ $(CPPFLAGS) ServerModule.cpp
Utilities.o:Utilities.cpp
    g++ $(CPPFLAGS) Utilities.cpp

我遇到了同样的问题。但我只是通过这段代码找到了出路。

export  LD_LIBRARY_PATH=/usr/local/Qt/5.5/gcc_64/lib:$LD_LIBRARY_PATH
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

与 libQt5Core 的链接 的相关文章

随机推荐

  • 在 Android AudioTrack 中使用缓冲区

    我试图弄清楚如何使用缓冲区音轨 http developer android com reference android media AudioTrack html有效地传输音乐 我知道您可以使用以下命令对音频进行排队write http
  • Mercurial - 比较本地和远程存储库?

    在Git中 有这样的命令 git remote show
  • 从数据集中完全删除一行

    我的网格视图上有一个删除按钮 单击删除按钮时 该行应该是 完全从会话中删除 我目前正在做以下事情 protected void gvMainLog RowCommand Object sender GridViewCommandEventA
  • MESI协议中的L3$角色是什么

    我想了解intel Broadwell中MESI的更多细节 假设一个cpu插槽有6个核心 core 0 到 core 5 他们每个人都有自己的 L1 和 L2 并共享 L3 共享内存中有一个var X x位于cache line 称为 XC
  • C `clock()` 函数只返回一个零

    The C clock 函数只返回一个零 我尝试使用不同的类型 但没有任何改进 这是一种高精度测量时间的好方法吗 include
  • 正则表达式:匹配第一个下划线之前的所有内容以及之后的所有内容

    我有这样的表情 test abc HelloWorld there could be more here 我想要一个采用第一个单词的正则表达式before第一个下划线 所以得到 test I tried A Za z 1 但这没有用 然后我
  • 如何全局安装ESlint?

    我正在尝试安装 ESlint 以将其与 Sublime Text 2 一起用于我的所有本地项目 配置文档 https eslint org docs user guide getting started global installatio
  • 重写泛型类的方法时发生名称冲突

    我试图理解使用以下代码得到的名称冲突错误 import java util import javax swing class Foo
  • 删除截断行末尾的字形

    当在启用了截断行的终端中使用 Emacs 23 时 Emacs 会在每行末尾添加一个美元符号 指示文本继续超出屏幕边缘 这让我很困扰 我想禁用此功能或以某种方式隐藏美元符号 这可能吗 如果是的话会怎样做 尝试用这个 set display
  • 2D 基本运动 UNITY

    目前我的角色在键盘上完美运行 但是当我通过 3 个 UI 按钮将你的动作转换为触摸时 我也尝试过 UI 图像 但成功了 我没有成功 它基本上是向右 向左 跳跃 应该如何做才能使其遵循以下说明 当用户按下方向键时 角色不会停止行走 直到用户释
  • C/C++编译器反馈优化

    有没有人看到过不同程序的真实世界数字 这些程序使用 C C 编译器提供的反馈优化来支持分支预测 缓存预加载功能等 我搜索了它 令人惊讶的是 即使是流行的解释器开发小组似乎也没有检查过效果 将 ruby python php 等性能提高 10
  • Kafka-node突然从偏移量0开始消费

    有时 kafka node 消费者从偏移量 0 开始消费 而其默认行为是仅消费较新的消息 然后它不会切换回默认行为 您知道如何解决这个问题以及会发生什么以及其行为突然发生变化吗 代码非常简单 并且无需更改代码即可完成此操作 var kafk
  • 实体框架 4 的存储库模式

    我曾经使用带有存储库接口的 NHibernate 在 EF 中使用此模式的正确方法是什么 我如何实现这个存储库接口RepositoryBase
  • 打开 Word 文档并使用 PowerShell 指定编码

    我试图告诉 PowerShell 打开一个文本文件并选择某个编码选项 默认情况下 在 Word 中手动打开此文本文件时 它会尝试使用日语编码打开它 因此无法正确显示某些字符 我尝试了很多不同的方法 但没有任何效果 所以我完全陷入困境 该文本
  • 如何展平嵌套 div 以在 CSS 网格中显示它们?

    我从一个应该有两列宽的对象生成一个表 使用 vue js 每列都来自对象的键和值 这相当于以下实际 HTML div div div this is something long on the first row div div short
  • 如何在 C 程序中将日志逻辑与业务逻辑分离?那么在 C++ 中呢?

    我目前正在使用 C 进行编码 并且有很多 printf 以便有时可以跟踪应用程序的流程 问题是 有时我想要比其他人更多的细节 所以我通常花时间注释 取消注释我的 C 代码 这样我就可以获得适当的输出 使用 Java 或 C 时 我通常可以使
  • Rust:从 std::Rc 智能指针向量实现迭代器

    我从 Rust 开始 我已经面临数据所有权的问题 我想实现一个名为的通用结构Port
  • 使用链表实现优先级队列

    我已经使用链表实现了优先级队列 在这个优先级队列中 最小的int值具有最高的值 因此通过调用remove方法 最小的方法将被删除 节点类代码 public class Node public int iData public Node ne
  • C#中的委托和C++中的函数指针有什么区别? [复制]

    这个问题在这里已经有答案了 可能的重复 c 中有函数指针吗 https stackoverflow com questions 2738850 are there function pointers in c 我有兴趣找出两者之间的区别de
  • 与 libQt5Core 的链接

    我使用在线安装程序安装了 Qt5 4 在 ubuntu 14 上运行 我正在尝试编译我的 C 源代码并链接到 libQt5Core 但 ld 抛出错误 make g Wall test o Party o Communication o F