我在Windows 10上运行MingW32。当我尝试使用以下命令编译程序时:
$ make -f Makefile
cc -g -Wall -o runScript.exe abc.o def.o ghi.o -lgdi32 -lcomdlg32 #-mwindows
我收到一个错误:
/bin/sh: cc: command not found
make: ***[runScript.exe] Error 127
将不胜感激的解决方案。
使用gcc时,使Makefile找不到cc的技巧通常是将CC = gcc.exe设置为环境变量或在make命令行上(如果需要,可以将CXX = g ++。exe,也可以根据需要指定完整路径)。这:(make CC=gcc.exe
您实际上不需要添加,-f Makefile
因为这是默认设置)。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句