Boost logo

Boost-Build :

Subject: [Boost-build] [run] error on Win32: trying to create a binary out of target name
From: Raffi Enficiaud (raffi.enficiaud_at_[hidden])
Date: 2016-10-19 03:18:07


Hi,

I have a strange error on Windows/MSVC using the run target.

The error is

""""""""
build 19-Oct-2016 07:04:20 msvc.manifest
..\..\..\bin.v2\libs\test\test\msvc-12\debug\threading-multi\smoke-ts-static.exe
build 19-Oct-2016 07:04:20 common.mkdir
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test
build 19-Oct-2016 07:04:20 common.mkdir
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test\msvc-12
build 19-Oct-2016 07:04:20 common.mkdir
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test\msvc-12\debug
build 19-Oct-2016 07:04:20 common.mkdir
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test\msvc-12\debug\threading-multi
build 19-Oct-2016 07:04:20 msvc.link
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test\msvc-12\debug\threading-multi\bt-st-txml-0.exe
build 19-Oct-2016 07:04:20 LINK : warning LNK4001: no object files
specified; libraries used
build 19-Oct-2016 07:04:20 LINK : error LNK2001: unresolved external
symbol _mainCRTStartup
build 19-Oct-2016 07:04:20
..\..\..\bin.v2\libs\test\test\bt-st-txml-0.test\msvc-12\debug\threading-multi\bt-st-txml-0.exe
: fatal error LNK1120: 1 unresolved externals
"""

Basically, it creates "bt-st-txml-0.exe" while it should not. On Linux,
I have the following:

"""""
build 19-Oct-2016 06:17:37 common.mkdir
../../../bin.v2/libs/test/test/bt-st-txml-0.test
build 19-Oct-2016 06:17:37 common.mkdir
../../../bin.v2/libs/test/test/bt-st-txml-0.test/clang-darwin-4.2.1
build 19-Oct-2016 06:17:37 common.mkdir
../../../bin.v2/libs/test/test/bt-st-txml-0.test/clang-darwin-4.2.1/debug
build 19-Oct-2016 06:17:37 testing.capture-output
../../../bin.v2/libs/test/test/bt-st-txml-0.test/clang-darwin-4.2.1/debug/bt-st-txml-0.run
build 19-Oct-2016 06:17:37 **passed**
../../../bin.v2/libs/test/test/bt-st-txml-0.test/clang-darwin-4.2.1/debug/bt-st-txml-0.test
"""""

which does not tell me if this is creating a binary or not, but I cannot
see any in the test folder.

The related bjam is visible there:
https://github.com/boostorg/test/blob/bug/hotfix-cast/test/Jamfile.v2#L236-L265

 From the [run] rule
""""""
rule run ( sources + : args * : input-files * : requirements * :
target-name ?
     : default-build * )
""""""

I understand that "target-name" is just a name and does not necessarily
yield to the compilation of anything. In particular, if "sources" is a
binary, it should just "run" this binary and name the target for the test.

What am I missing?

Thanks,
Raffi


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk