开发者

SConscript StaticLibrary attribute error.

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 开发者_StackOverflow社区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)


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜