[英]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.