Boost-bjam: link result with precompiled library

佐手、 提交于 2019-12-11 06:45:00

问题


What should I put into my jamroot.jam file so that libAPLibrary.so is linked with the result of MyProject compilation?

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

回答1:


if the library libAPLibrary.so is already compiled one you should declare it and the link it against the project, this way:

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
;


来源:https://stackoverflow.com/questions/11537786/boost-bjam-link-result-with-precompiled-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!