【问题标题】:Debug Qt project file?调试 Qt 项目文件?
【发布时间】:2015-12-12 16:10:45
【问题描述】:

假设有这样的指令:

LIBS += -L"../qwt-6.1.2/lib/"

在 Qt 项目文件中。有没有办法检查这个路径是否包含在要搜索库的路径中?

我陷入了交叉编译会话。我可以在 Linux (Raspbian) 上成功构建项目,但无法在 Windows (cross) 中构建项目。而且我认为交叉编译设置很好,因为我可以构建其他不依赖 Qwt 的项目。

即使使用绝对路径也不能在跨环境中工作。

有什么想法吗?

不确定它是否有很大帮助,但这是错误:

c:/sysgcc/raspberry/bin/../lib/gcc/arm-linux-gnueabihf/4.6/../../../../arm-linux-gnueabihf/bin/ld.exe: cannot find -lqwtd
collect2: ld returned 1 exit status
Makefile:190: recipe for target 'debug/MyProject' failed
mingw32-make: *** [debug/MyProject] Error 1
13:58:40: The process "C:\SysGCC\MinGW32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project MyProject(kit: Qt 4.8.6 (Raspberry))
When executing step "Make"

【问题讨论】:

    标签: qt cross-compiling raspbian raspberry-pi2 qwt


    【解决方案1】:

    你可以!最简单的方法是使用类似的东西:

    message("LIBS contains:")
    message($$LIBS)
    

    这将在每次 qmake 运行时生成控制台输出。 但是,由于您刚刚添加了LIBS 的路径,恐怕这不会解决您的问题。 (但可能会派上用场)

    【讨论】:

    • 当您使用“警告”而不是“消息”时,调试信息由 Qt Creator 而不是 qmake 显示
    猜你喜欢
    • 2018-10-19
    • 2021-01-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-06-19
    • 2012-04-13
    相关资源
    最近更新 更多