简体   繁体   English

g++:错误:无法识别的命令行选项“--cflags” g++:错误:无法识别的命令行选项“--libs”

[英]g++: error: unrecognized command-line option '--cflags' g++: error: unrecognized command-line option '--libs`'

I got these errors trying to execute mingw32-make:我在尝试执行 mingw32-make 时遇到了这些错误:

g++: error: unrecognized command-line option '--cflags' g++: error: unrecognized command-line option '--libs '` g++: error: unrecognized command-line option '--cflags' g++: error: unrecognized command-line option '--libs

The makefile is the following: makefile 如下:

all:
    g++ fitscli.cpp vipsoperations.cpp fits.cpp ConsoleTable.cpp `pkg-config vips-cpp --cflags --libs`  -lcfitsio -ltiff -o fitscli

After some research there was a suggestion to delete '--cflags' and '--libs` from the code, and I did it.经过一些研究,有人建议从代码中删除“--cflags”和“--libs”,我照做了。

I know is that maybe the compiler g++ is not having able the options '--cflags' and '--libs` I also tried to change to gcc compiler, but doesn´t work.我知道编译器 g++ 可能无法使用选项“--cflags”和“--libs”我也尝试更改为 gcc 编译器,但不起作用。

I am working on windows 11, with Msys URCT64我正在使用 Msys URCT64 开发 windows 11

When I deleted the lines suggested, is causing another compilation error, so I want to know how to fix the flags issue without deleted them from the code.当我删除建议的行时,会导致另一个编译错误,所以我想知道如何修复标志问题而不从代码中删除它们。

Thanks.谢谢。

The backticks ` ` don't seem to work properly in mingw32-make (because it uses CMD as the shell, which doesn't support them).反引号` `mingw32-make中似乎无法正常工作(因为它使用 CMD 作为 shell,不支持它们)。

Use make instead (install with pacman -S make ), which uses Bash.请改用make (使用pacman -S make安装),它使用 Bash。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 g++:错误无法识别的命令行选项 -municode 使用 Cygwin - g++: error unrecognized command-line option -municode using Cygwin 优胜美地 g++ 上的 capybara-webkit:错误:无法识别的命令行选项“-Xarch_x86_64” - capybara-webkit on yosemite g++: error: unrecognized command line option '-Xarch_x86_64' cc1plus:错误:无法识别的命令行选项“ -fsysroot = <path> ”和g ++ - cc1plus: error: unrecognized command line option “-fsysroot=<path>” with g++ cc1plus:错误:使用g ++无法识别的命令行选项“-std = c ++ 11” - cc1plus: error: unrecognized command line option “-std=c++11” with g++ c++:错误:无法识别的命令行选项“-target” - c++: error: unrecognized command-line option ‘-target’ g ++:错误:无法识别的选项&#39;--as-needed&#39; - g++: error: unrecognized option ‘--as-needed’ 安装以C ++编写的Python软件包(左)时出错:g ++无法识别的命令行选项--output-lib - Error installing Python package (leven) written in C++: g++ unrecognized command line option --output-lib Scons选择哪个g ++版本| 无法识别的命令行选项“ -std = c ++ 11” - which version of g++ does Scons pick | unrecognized command line option “-std=c++11” g ++错误,无法识别的选项,--subsystem控制台”在ubuntu中的eclipse中 - g++ error, unrecognized option, --subsystem console" in eclipse in ubuntu 为什么“cc1plus:警告:无法识别的命令行选项”用于“no-”选项仅在有另一个警告时由g ++标记? - why is “cc1plus: warning: unrecognized command line option” for “no-” options only flagged by g++ when there is another warning?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM