如何告诉scons使用MinGW而不是MSVC [英] How to tell scons to use MinGW instead of MSVC

查看:1150
本文介绍了如何告诉scons使用MinGW而不是MSVC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to build the C++ port of zxing on Windows, but scons fails with:

cl : Command line error D8021 : invalid numeric argument '/Wextra'

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

I have both VS2010 and MinGW installed, and scons tries to use the MSVC compiler, even though the SConscript file assumes gcc and use gcc-specific parameters, which causes the error.

如何告诉scons使用MinGW?

How can I tell scons to use MinGW instead?

推荐答案

Scons在Windows上默认使用MSVC编译器。在创建Environment对象时设置mignw编译器使用工具参数。

Scons uses MSVC compiler by default on windows. To set mignw compiler use tools parameter while creating Environment object.

env = Environment(tools = ['mingw'])

这篇关于如何告诉scons使用MinGW而不是MSVC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆