Re: Issue: using Replace to replace ENV PATH
Bill Deegan <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <CAEyG4CE_DrD12Nyvh9YoJWzRpDDWPi1d1PbAgvrLU24VQz3=BA@mail.gmail.com> |
Tony, Not sure how you crafted this email, but it's almost unreadable due to code formatting in very narrow windows.. can you resend it all in plain text? -Bill On Sun, Jan 27, 2019 at 11:02 PM Tony Peter Long <[email protected]> wrote: > Hello all. > > > > I am a new SCons user as well as new to Open Source development in > general, so please forgive me if I’m missing some etiquette with this mail, > but I have a minor issue when using the *Replace* method to replace *ENV > PATH* as follows: > > > > PATH = {'PATH' : ['C:/cygwin/bin']} > > env = Environment() > > env.Replace(ENV = PATH) > > env.Replace(CXX = 'g++') > > env.Replace(CC = 'gcc') > > print "PATH = ", env['ENV'] > > print "CXX = ", env['CXX'] > > print "CC = ", env['CC'] > > env.Program('helloworld.cxx') > > gives: > > scons: warning: No version of Visual Studio compiler found - C/C++ > compilers most likely not set correctly > > File "D:\tony\SConstruct", line 2, in <module> > > PATH = {'PATH': ['C:/cygwin/bin']} > > CXX = g++ > > CC = gcc > > > > scons: warning: No version of Visual Studio compiler found - C/C++ > compilers most likely not set correctly > > File "C:\Python27\Scripts\scons.py", line 204, in <module> > > g++ /Fohelloworld.obj /c helloworld.cxx /TP /nologo > > g++: error: /Fohelloworld.obj: No such file or directory > > g++: error: /c: No such file or directory > > g++: error: /TP: No such file or directory > > g++: error: /nologo: No such file or directory > > scons: *** [helloworld.obj] Error 1 > > > > Whereas: > > PATH = {'PATH' : ['C:/cygwin/bin']} > > env = Environment(ENV = PATH) > > # env.Replace() > > env.Replace(CXX = 'g++') > > env.Replace(CC = 'gcc') > > print "PATH = ", env['ENV'] > > print "CXX = ", env['CXX'] > > print "CC = ", env['CC'] > > env.Program('helloworld.cxx') > > gives: > > scons: Reading SConscript files ... > > PATH = {'PATH': ['C:/cygwin/bin']} > > CXX = g++ > > CC = gcc > > scons: done reading SConscript files. > > scons: Building targets ... > > > > scons: warning: No version of Visual Studio compiler found - C/C++ > compilers most likely not set correctly > > File "C:\Python27\Scripts\scons.py", line 204, in <module> > > g++ -o helloworld.o -c helloworld.cxx > > g++ -o helloworld.exe helloworld.o > > scons: done building targets. > > > > I’m not particularly tied to the first implementation, so using the second > method suits me just fine. I was just wondering if this is intended, and if > so, why? > > > > Regards, > > Tony Long. > > > _______________________________________________ > Scons-users mailing list > [email protected] > https://pairlist4.pair.net/mailman/listinfo/scons-users > _______________________________________________ Scons-users mailing list [email protected] https://pairlist4.pair.net/mailman/listinfo/scons-users