Boost logo

Boost-Build :

Subject: Re: [Boost-build] msvc: building executables broken?
From: Jeroen van der Wulp (J.v.d.Wulp_at_[hidden])
Date: 2008-11-11 17:13:57


> Building executables with msvc (2008 Express) on Windows XP seems broken
> at least when running from a shell without the environment setup. There
> is a problem with finding mt:
>
> 'mt' is not recognized as an internal or external command
>

Besides this issue it is also impossible to use searched libraries:

lib wsock32 : <name>"wsock32" ;

using this target results in an error of the form:

LINK : fatal error LNK1104: cannot open file
'<lbuild/msvc-9.0/debug/link-static/pch-off/stdlib-stlport-5.1.6/threading-multi>wsock32.obj'

This problem seems to have been introduced in revision 49645. It can be
a typo. Replacing generator.generated-targets with
linking-generator.generated-targets in the implementation of the msvc
linking generator solves this problem. I have attached the patch that I
applied for testing with MSVC.

Best,

Jeroen

Index: ../boost/tools/build/v2/tools/msvc.jam
===================================================================
--- ../boost/tools/build/v2/tools/msvc.jam (revision 49688)
+++ ../boost/tools/build/v2/tools/msvc.jam (working copy)
@@ -898,7 +898,7 @@
             }
             else
             {
- toolset.flags msvc.link .MT $(cpu-conditions) : $(manifest-tool) -nologo ;
+ toolset.flags msvc.link .MT $(cpu-conditions) : $(setup-$(c))$(manifest-tool) -nologo ;
             }
 
             if $(cc-filter)
@@ -990,7 +990,7 @@
     # whatever.gch.
     rule generated-targets ( sources + : property-set : project name ? )
     {
- local result = [ generator.generated-targets $(sources)
+ local result = [ linking-generator.generated-targets $(sources)
           : $(property-set) : $(project) $(name) ] ;
         if [ $(property-set).get <embed-manifest> ] = "off"
         {


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