gpt4 book ai didi

c++ - 如何解决错误 "o rule to make target"?

转载 作者:行者123 更新时间:2023-11-28 04:06:55 24 4
gpt4 key购买 nike

当我尝试编译 Cartotype 的项目图时弹出此错误,我按照 Cartotype 文档中的说明进行操作,但此时我无法取得任何进展,请帮助!

:-1: error: No rule to make target 'G:/QT/Projects/cartotype-eval/CartoType-Public/src/apps/Maps/../../../../cartotype_windows_sdk_evaluation_5.10.7/CartoType/bin/15.0/x64/DebugDLL/libcartotyped.a', needed by 'debug/CartoTypeMaps.exe'.  Stop.

我的同事在 QT Linux - Ubuntu 上测试了同一个项目,并且运行顺利!

最佳答案

我假设您正在使用 MinGW,因为构建工具正在寻找 foo.a。您只需查看该错误并理解其含义:缺少所需的库。在您提供该库之前,它不会构建。这是简单的部分。困难的部分是 according to the SDK overview , CartoType 仅带有 .lib 库,而不是 .a 库。但是现代 MinGW 支持 .lib 文件,所以你只需要说服它寻找 .lib 文件,而不是 .a 文件。最有可能的是,您的构建脚本引用了 .a,或者没有任何完整的文件名。

如果您正在使用 QMAKE,您可能会遇到类似的情况:

LIBS += -LX:/cartotype_windows_sdk_evaluation_5.10.7/CartoType/bin/15.0/x64/DebugDLL cartotyped

相反,您需要:

LIBS += X:/cartotype_windows_sdk_evaluation_5.10.7/CartoType/bin/15.0/x64/DebugDLL/cartotyped.lib

关于c++ - 如何解决错误 "o rule to make target"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58573890/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com