gpt4 book ai didi

c++ - SCons 无法选择编译器 (MinGW)

转载 作者:太空狗 更新时间:2023-10-29 20:41:27 28 4
gpt4 key购买 nike

<分区>

我有一个包含以下代码的简单 SConstruct 文件

path = ['C:\\MinGW\\bin']
env = Environment(ENV = {'PATH' : path})

Program(target = 'myprogram', source = ['main.cpp'])

在 cmd 上运行“scons”会出现以下错误消息:

cl /Fomain.obj /c main.cpp /TP /nologo
'cl' is not recognized as an internal or external command,
operable program or batch file.
scons: *** [main.obj] Error 1
scons: building terminated because of errors.

看起来 SCons 没有选择我的编译器 (MinGW)。我究竟做错了什么?我使用的是 Windows 7 64 位。

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