How to dynamically link a shared library to a C++ program using bjam and Boost.build ?

Hi all, I have written a program that uses the ATLAS library and some boost libraries. When I try to compile the program it says that the function cblas_dgemm() is not found. However, I have installed ATLAS properly on my machine and the libcblas.a and libcblas.so exist in the folder /usr/local/atlas/lib. How do I tell it to bjam via Jamfile that my program wants to link to this library? The Tutorial on Boost.Build tells how to include header files using <include> tag, but how to link dynamic shared libraries? What should I write in the Jamfile to make this work?

ajay gopalakrishnan wrote:
Hi all,
I have written a program that uses the ATLAS library and some boost libraries. When I try to compile the program it says that the function cblas_dgemm() is not found. However, I have installed ATLAS properly on my machine and the libcblas.a and libcblas.so exist in the folder /usr/local/atlas/lib. How do I tell it to bjam via Jamfile that my program wants to link to this library?
The Tutorial on Boost.Build tells how to include header files using <include> tag, but how to link dynamic shared libraries?
It's documented, too: http://www.boost.org/boost-build2/doc/html/bbv2/tutorial/prebuilt.html - Volodya

hi! ajay gopalakrishnan schrieb:
The Tutorial on Boost.Build tells how to include header files using <include> tag, but how to link dynamic shared libraries? What should I write in the Jamfile to make this work?
See "Prebuilt Targets" here: http://www.boost.org/boost-build2/doc/html/bbv2/tutorial/prebuilt.html you would want: lib cblas : #no sources : <search>/usr/lib/atlas : # : <include>/usr/include/altas #maybe? ; Frank
participants (3)
-
ajay gopalakrishnan
-
Frank Birbacher
-
Vladimir Prus