LoginSignup
0
0

More than 5 years have passed since last update.

wafでstatic library (.a)を一緒にビルドする

Posted at

まとめ

bld.program に対して、stlibstlibpath を指定してやればOKです(公式ドキュメントに書いてあるんですが、ググラビリティに少し貢献しようかなと思い、メモがてら書いておきます)

ローカルにある libstlib1.alibstlib2.a を一緒にビルドしたいとすると、

wscript(一部抜粋)
def build(bld):
     bld.program(
        source = 'foo.cpp',
        target = 'foo',
        stlib = [
            'stlib1',
            'stlib2',
            ],
        stlibpath = ['ライブラリのパス'],
        includes = ['.']
    )

例えばこんな感じで書けばOK。stlib = ['libstlib1', 'libstlib2'] のように、libから始めるとコンパイルにコケるので注意

参考

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0