[Scons-users] Specify Toolchain for Windows

R0b0t1 r030t1 at gmail.com
Wed May 17 12:15:47 EDT 2017


On Tue, May 16, 2017 at 10:24 PM, Bill Deegan <bill at baddogconsulting.com> wrote:
> By the time you set PATH, the mingw tool has already initialized with the
> default path.
>
> Try this:
>
> path = ['C:\MinGW\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin']
>
> env = Environment(tools=['])
> env.PrependENVPath('PATH',path)
> env.Tool('default')
> shooter = env.Program(target=target, source=sources,
>                   LIBS=libraries, CPPPATH=incpath, LIBPATH=libpath)
>

Thanks Bill, but that still may not be early enough. Also I think
there may be issues with Unicode support even in the Python 2.7
version of SCons but I was able to work around them for now.

```Python
path = [unicode('C:\MinGW\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin',
errors='ignore')]

environ = Environment(tools=[])
environ.PrependENVPath('PATH', path)
environ.Tool('default')
```

I receive the same MinGW linker message where it tried to use the 32
bit toolchain.


More information about the Scons-users mailing list