相关疑难解决方法(0)

如何告诉scons使用MinGW而不是MSVC

我正在尝试在Windows上构建zxing的C++端口,但是scons失败了:

cl : Command line error D8021 : invalid numeric argument '/Wextra'
Run Code Online (Sandbox Code Playgroud)

我安装了VS2010和MinGW,并且scons尝试使用MSVC编译器,即使SConscript文件假定gcc并使用gcc特定的参数,这会导致错误.

我如何告诉scons使用MinGW?

mingw compiler-errors scons visual-studio zxing

11
推荐指数
1
解决办法
4225
查看次数

如何根据编译器类型在SConstruct for C编译器中设置选项?

我需要为C编译器设置其他选项,例如添加标志以打开所有警告,具体取决于编译器的类型.例如,我应该使用MSVC

env.Append(CPPFLAGS = "/Wall")
Run Code Online (Sandbox Code Playgroud)

但对于mingw(gcc)我需要使用:

env.Append(CCFLAGS = "-Wall") 
Run Code Online (Sandbox Code Playgroud)

我怎样才能以scons的方式做到这一点?

c compiler-construction scons compiler-options

5
推荐指数
1
解决办法
3188
查看次数