Skip to content

Missing <arch-and-model> if using msvc #730

Description

@UMU618

I use b2 to compile a simple example, and got an error with msvc/Windows:

$ b2
...patience...
...found 817 targets...
...updating 1 target...
msvc.link bin\msvc-14.2\release\cxxstd-latest-iso\threading-multi\test_boost.exe
LINK : fatal error LNK1181: cannot open input file 'boost_program_options-vc142-mt-1_76.lib'

        call "bin\standalone\msvc\msvc-14.2\msvc-setup.bat"  >nul
 link /NOLOGO /INCREMENTAL:NO "bin\msvc-14.2\release\cxxstd-latest-iso\threading-multi\main.obj"    "boost_program_options-vc142-mt-1_76.lib"  /MACHINE:X64 /MANIFEST:EMBED /subsystem:console /out:"bin\msvc-14.2\release\cxxstd-latest-iso\threading-multi\test_boost.exe" /LIBPATH:"C:\dev\lib"

...failed msvc.link bin\msvc-14.2\release\cxxstd-latest-iso\threading-multi\test_boost.exe...
...failed updating 1 target...

The file boost_program_options-vc142-mt-1_76.lib should be boost_program_options-vc142-mt-x64-1_76.lib.

return [ common.format-name <base> <toolset> <threading> <runtime>

After looking up boost.jam, I think on Windows this should be:

rule tag_versioned ( name : type ? : property-set )
{
    return [ common.format-name <base> <toolset> <threading> <runtime> <arch-and-model>
        -$(.version_tag) -$(.build_id) : $(name) : $(type) : $(property-set) ] ;
}

After adding , b2 architecture=x86 address-model=64 succeeded.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions