Search code examples
c++linkerbjam

Bjam: ignore specific library


Using Visual Studio, it is possible to 'Ignore Specific Library' (Project Properties > Configuration Properties > Linker > Input > Ignore Specific Library).

We found this useful in a project. Now we want to build that project using boost-build (bjam), but we need to reproduce that linker behaviour.

Is there any ignore library feature with bjam?


Solution

  • You could set it at the command line

    bjam linkflags=/NODEFAULTLIB:xxx
    

    Or from within a jamfile

    <linkflags>/NODEFAULTLIB:xxx
    

    Or use Visual Studio's pragma comment feature in your code itself

    #pragma comment(linker, "/NODEFAULTLIB:xxx")