3

I couldn't find any information on the net, so I kindly ask you for one.

I have my build environment set up properly,
My compiler is 'cl' from VS express package.

I try to build static library,
when i set my tools to 'default' everything works, but when i set it to 'msvc'
i have following error:

scons: Reading SConscript files ...
AttributeError: 'SConsEnvironment' object has no attribute 'Library':
  File "D:\N\workspace\cpp\sipher\SConstruct", line 37:
    sCypherlib_gen = env.SConscript(os.path.join(libbuilddir, 'lib_gen', 'SConscript'), 'env')
  File "C:\Python26\Lib\site-packages\scons-2.0.1\SCons\Script\SConscript.py", line 551:
    return _SConscript(self.fs, *files, **subst_kw)
  File "C:\Python26\Lib\site-packages\scons-2.0.1\SCons\Script\SConscript.py", line 260:
    exec _file_ in call_stack[-1].globals
  File "D:\N\workspace\cpp\proj\src\SConscript", line 5:
    lib = env.Library(target='myProg', source = src)

2 Answers 2

4

So i've asked scons gurus and they've told me that i need to add:
'mslink', and 'mslib' to my tools.
They fixed my problem.

Sign up to request clarification or add additional context in comments.

Comments

3

What 'bua' said is for Windows. I asked my 'scons guru' and he told me to add the following list to my tools (I'm in Linux)

tools = ['default', 'collect_files', 'getlibs', 'svn_info',
           'convert_template', 'custom_builders', 'nvcc',
           'remove', 'platform_info', 'autodir']

So it depends.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.