-->

升压的bjam:与预编译库链接结果(Boost-bjam: link result with pre

2019-10-17 01:41发布

我应该把我的jamroot.jam文件,以便libAPLibrary.so与MyProject的编译结果链接?

root
  |-MyProject
  |   |-jamroot.jam
  |
  |-AnotherProject
      |-lib
          |-libAPLibrary.so 

Answer 1:

如果库libAPLibrary.so已经编译一个你应该申报,并针对项目的链接它,这样说:

lib libAPLibrary : : 
    # watch out for empty spaces, they are mandatory
    <file>../AnotherProject/lib/libAPLibrary.so ;

exe MyProject
    : 
        # your project sources here
        # this is a generic filter but you 
        # can replace it with file names
        [ glob *.c* ] 

        # external libraries
        libAPLibrary
;


文章来源: Boost-bjam: link result with precompiled library