Boost logo

Boost-Build :

Subject: Re: [Boost-build] Passing link-flags to boost-build
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-03-30 19:22:29


On 03/30/2017 12:19 PM, Ts, Raghu via Boost-build wrote:
> I'm new to the Boost-world and have been entrusted with a task to build these libraries for UWP-Apps. I'm particularly interested in following libraries - 'filesystem', 'log', 'thread'. I tried building the entire gamut of libraries in Store-mode, but encountered many failures, including these libraries of interest.

  Please post specific errors. These three libraries
all require platform specific implementation, so it's
entirely possible that they don't support building with
windows-api=store. (Also, assuming that the command
line isn't the problem, compile errors would be more
appropriate at boost-users.)

> Alternatively, I set out to build the Boost-libraries in Desktop-mode, but linking only against 'OneCoreUap.lib', instead of the plethora of libraries such as 'kernel32.lib', 'advapi32.lib', 'user32.lib', etc. However, I'm not able to pass on the link-flags to build-tool.
> I'm using the following JAM-declaration:
> using msvc : 14.0 : :
> <linkflags>"\"C:/WDK/Lib/winv10.0/um/x64/OneCoreUAP.Lib"\"
> <linkflags>/NODEFAULTLIB:"kernel32.lib"
> <linkflags>/NODEFAULTLIB:"advapi32.lib"
> ;
> Whether I use the command-line option or via JAM-file declaration, the link-options don't get passed on to the build-tool. If I modify the <linkflags> to <compileflags>, all the options get propagated properly; of course, it'll lead to errors as these are not compile-time flags.
> Could someone please help me with what am I missing?

I can't reproduce your problem. After pasting the above
into my user-config.jam, I ran:

b2 --with-system link=shared debug -n -a

Looking at the output I see:
/subsystem:console /out:"...\boost_system-vc140-mt-gd-1_63.dll"
"C:/WDK/Lib/winv10.0/um/x64/OneCoreUAP.Lib" /NODEFAULTLIB:kernel32.lib
/NODEFAULTLIB:advapi32.lib @"...\boost_system-vc140-mt-gd-1_63.dll.rsp"
which looks right.

What version of Boost are you using?
What command /exactly/ are you using to build?

In Christ,
Steven Watanabe

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at