[Scons-users] compiler detection

Philipp Kraus philipp.kraus at flashpixx.de
Sun Oct 28 10:35:57 EDT 2012


On 2012-10-25 21:09:30 +0200, William Deegan said:


> Phil,

>

> On Oct 25, 2012, at 12:46 AM, Kraus Philipp <philipp.kraus at flashpixx.de> wrote:

>

>> Hello,

>>

>> I'm using on Windows 7 Visual Studio and MinGW Shell with Gcc / G++. If

>> I run Scons on the VS command line, Scons uses on env.Program the VS

>> compiler (cl.exe), on the other hand if I run Scons from the MinGW

>> shell, it uses also the cl.exe, but not the g++.exe. I can now

>> overwrite the CXX / CC flag in the env, but why does Scons uses always

>> the Visual Studio compiler? The PATH variable under MinGW shell does

>> not have any path information to Visual Studio. IMHO I would like to

>> detect and use under VS command line the VS compiler & linker (cl.exe &

>> link.exe) and under MinGW shell the gcc / g++.

>

> On win32 there's a list (in order) of the compilers to search for.

> If you want to detect the platform and change the preferences, you can

> list the tools (mingw…) when you initialize the Environment() you are

> using.


Do you have got a code excerpt how to change this list?

Phil




More information about the Scons-users mailing list