c++ - 如何在 WAF 中构建静态库?

标签 c++ waf

我的场景是这样的:

脚本:

def options(opt):
    opt.load('compiler_c')
    opt.load('compiler_cxx')        

def configure(ctx):
    ctx.load('compiler_c')
    ctx.load('compiler_cxx')        

def build(ctx):
    ctx.objects(source = "file0.c",
                target = "cFiles")

    ctx.objects(source = "file1.cpp file2.cpp",
                target = "cxxFiles")

    ctx.stlib(source = "???",
              target = "test")   

如何调用“ctx.STLib()”?

最佳答案

ctx(features='c cxx cxxSTLib', use='cFiles cxxFiles', target='test')

编辑:删除无效链接。

关于c++ - 如何在 WAF 中构建静态库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27990722/

相关文章:

installation - 如何使用waf递归安装目录

node.js - 如何使用调试符号制作node-waf构建二进制文件?

c++ - gRPC async_client 中的内存泄漏

c++ - 如何更有效地从 vector 或集合中删除元素?

c++ - 从需要 QImage 或 QPixmap 的 QML 调用插槽

introspection - 如何使用 waf 为 gir 文件生成类型库

migration - 有没有工具可以帮助从 make 迁移到 waf?

c++ - 是否可以在 C++ 中使用带有模板参数的宏条件?

c++ - 与 Yeppp 一起表演!比 native 实现慢

eclipse - 将外部构建工具集成到 Eclipse 中的最佳方法是什么?