[Scons-users] Specify Toolchain for Windows

Steve - Gadget Barnes gadgetsteve at hotmail.com
Thu May 18 02:10:09 EDT 2017


On Wed, May 17, 2017 at 9:15 AM, R0b0t1 <r030t1 at gmail.com> wrote:

 > 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.
 > _______________________________________________
 > Scons-users mailing list
 > Scons-users at scons.org
 > https://pairlist4.pair.net/mailman/listinfo/scons-users
 >

The big problem is that you are specifying paths as 
'C:\MinGW\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin' rather than any of:

  - r'C:\MinGW\x86_64-6.3.0-posix-seh-rt_v5-rev2\mingw64\bin'
  - 'C:\\MinGW\\x86_64-6.3.0-posix-seh-rt_v5-rev2\\mingw64\\bin'
  - 'C:/MinGW/x86_64-6.3.0-posix-seh-rt_v5-rev2/mingw64/bin'

So \x86 for example is being treated as a hex character with a value of 
0x86.

-- 
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect 
those of my employer.


More information about the Scons-users mailing list