Question

recently I have downloaded latest version of mingw for win7 64bit. also i have a program to build with scons but when i try to run it I see "cl is not recognized as an internal or external command" I search on internet and this site they suggest two solutions fist checking environment varible second install this mingw from here

http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/

but I am sure my environment is true c:\mingw\bin and I have a new version of mingw for win 7 64 bits

I will appreciate any suggestion.

Was it helpful?

Solution

As I mentioned in the comment to your question, its looking for the Windows compiler, which you probably dont have installed. According to the SCons man page, you can fix this as follows:

MinGW

The MinGW bin directory must be in your PATH environment variable or the PATH variable under the ENV construction variable for SCons to detect and use the MinGW tools. When running under the native Windows Python interpreter, SCons will prefer the MinGW tools over the Cygwin tools, if they are both installed, regardless of the order of the bin directories in the PATH variable. If you have both MSVC and MinGW installed and you want to use MinGW instead of MSVC, then you must explictly tell SCons to use MinGW by passing

tools=['mingw']

to the Environment() function, because SCons will prefer the MSVC tools over the MinGW tools.

So, change the instantiation of your Environment to something like this:

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

If you need to specify more in the Environment constructor, you can do something like this:

env = Environment(tools=['mingw'], variables = command_line_vars)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top