问题
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