网上找的:Scons使用MinGW
#SConstruct import platform import os if platform.system() == 'Windows': env = Environment(tools = ['mingw'], ENV = os.environ) env.PrependENVPath('PATH', 'C:\\Dev-Cpp\\bin') env.PrependENVPath('LIB', 'C:\\Dev-Cpp\\lib') else: env = Environment(ENV = os.environ) env.Program(['main.cpp'], LIBS = libs, LIBPATH=libpath, CCFLAGS=cflags)