windows - SConscript StaticLibrary 属性错误。

标签 windows static-libraries scons

我在网上找不到任何信息,所以我恳请您提供一个。

我已经正确设置了构建环境,
我的编译器是来自 VS Express 包的“cl”。

我尝试构建静态库,
当我将我的工具设置为“默认”时,一切正常,但当我将其设置为“msvc”时
我有以下错误:

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)

最佳答案

所以我问过 scons 专家,他们告诉我我需要添加:
“mslink”和“mslib”到我的工具。
他们解决了我的问题。

关于windows - SConscript StaticLibrary 属性错误。,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3879913/

相关文章:

c++ - 从 DllMain 或全局初始值设定项调用 C++ 运行时

windows - 在txt文件中循环并使用批处理文件列出内容

sdk - 如何在sdk中获取静态库?

C++ - 如何内联驻留在 .lib 中的函数?

c++ - SCons 链接到子目录库

windows - 赢得批处理 : copy files on different folders

带有图像资源的 iOS 静态库

python - 如何在 'scons' 中为命令生成器指定 COMSTR

c++ - 为什么在 dlopen 函数中传递的 std::any 的 std::any_cast 会引发错误

c# - 在登录菜单上运行 C# 应用程序