I need to link against a set of libraries in boost.build`. How do I specify the linking order?
This is what I have in the Jamfile.
exe sim_strategy
: sim_strategy.cpp
:
<linkflags>-lOptionsUtils
<linkflags>-lVolatileTradingInfo
<linkflags>-lCommonTradeUtils
<linkflags>-lBaseUtils
<linkflags>-lTradingInfo
<linkflags>-lTradeUtils
<linkflags>-lExternalData
<linkflags>-lMarketAdapter
<linkflags>-lOrderRouting
<linkflags>-lSmartOrderRouting
<linkflags>-lInitCommon
<linkflags>-lExecLogic
<linkflags>-lRiskManagement
<linkflags>-lOptionsUtils
<linkflags>-lModelMath
<linkflags>-lORSMessages
<linkflags>-lProfiler
: <variant>debug <variant>release
;
It produces a command like:
"g++" -L"/apps/bzip2/lib" -L"/home/gchak/boost-try/boost-install/lib" -L"/home/gchak/cvquant/basetrade_install/lib" -o "InitLogic/bin/gcc-6.3.0/release/link-static/sim_strategy" -Wl,--start-group "InitLogic/bin/gcc-6.3.0/release/link-static/sim_strategy.o" "/home/gchak/cvquant/basetrade_install/lib/libSimPnls.a" "/home/gchak/cvquant/basetrade_install/lib/libSimMarketMaker.a" "/home/gchak/cvquant/basetrade_install/lib/libLoggedSources.a" -Wl,-Bstatic -Wl,-Bdynamic -Wl,--end-group -lBaseUtils -lCDef -lCommonDataStructures -lCommonTradeUtils -lExecLogic -lExternalData -lIndicators -lInitCommon -lMarketAdapter -lModelMath -lORSMessages -lOptionsUtils -lOrderRouting -lProfiler -lRiskManagement -lSmartOrderRouting -lTradeUtils -lTradingInfo -lUtils -lVolatileTradingInfo -lboost_date_time -lboost_filesystem -lboost_iostreams -lboost_system -lcrypto -lcurl -lz
However, changing the order of libraries executes the command. I can't seem to find a way to specify it in the Jamfile.