Boost logo

Boost-Build :

Subject: Re: [Boost-build] Passing link-flags to boost-build
From: Ts, Raghu (raghu.ts_at_[hidden])
Date: 2017-03-31 05:17:10

Hi Steven,

I realized my mistake; it was an elementary one. I'd used the option "link=static" in my command-line, which would just create an archive of unlinked binary object files instead of checking against the dependencies. Once I changed it to "link=shared", I could see that my link-flags were propagated to the build-system.

Thank you for your response & apologize for wasting your time on a silly matter.


-----Original Message-----
From: Boost-build [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Steven Watanabe via Boost-build
Sent: Friday, March 31, 2017 12:52 AM
To: Boost.Build developer's and user's list <boost-build_at_[hidden]>
Cc: Steven Watanabe <watanabesj_at_[hidden]>
Subject: Re: [Boost-build] Passing link-flags to boost-build


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:
link /NOLOGO /INCREMENTAL:NO /DLL /DEBUG /MACHINE:X86 /MANIFEST /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

Unsubscribe & other changes:

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