$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-users] Build Boost.Context with Visual Studio
From: Thomas Ziegenhagen (thomas_at_[hidden])
Date: 2016-02-26 07:26:33
Hi there,
I'm building the required portions of Boost myself, along with all my  
other projects. It turned out that even the smallest compiler setting  
changes lead to strange crashes, some of which only occured on 5% of the  
client's systems, so I will not use externally built boost libraries  
anymore.
So now I'm building the parts of boost which I require, which works fine  
so far.
The trouble starts when I tried to use Boost.Context. It also contains ASM  
code, which I now need to build in Visual Studio 2015. VS2015 does not  
have builtin Asm support, for x64 it never had. So I'm invoking the  
Microsoft assembler as a custom build step. Command line is as follows:
ml64 /Fo path/to/obj/file.obj /c path/to/source/jump_x86_64_ms_pe_masm.asm
Documentation is as scarce as usual, but I figured from the filename that  
jump_x86_64_ms_pe_masm.asm is the correct file for Microsoft Visual  
Studio, x64. But assembling failed, and to add insult to injury, the error  
messages are lost somewhere in the output piping process. The complete  
output reads like this:
------
1>------ Erstellen gestartet: Projekt: boost, Konfiguration: Debug x64  
------
1>  Microsoft (R) Macro Assembler (x64) Version 14.00.23506.0
1>  Copyright (C) Microsoft Corporation.  All rights reserved.
1>
1>   Assembling:  
C:\Projekte\DeadPlanet\SourceExt\boost\context\asm\jump_x86_64_ms_pe_masm.asm
1>   
C:\Projekte\DeadPlanet\SourceExt\boost\context\asm\jump_x86_64_ms_pe_masm.asm(80)ied  
size
1>: error A2008 : syntax error : FRAME
1>   
C:\Projekte\DeadPlanet\SourceExt\boost\context\asm\jump_x86_64_ms_pe_masm.asm(81)ied  
size
1>CUSTOMBUILD : warning A4020: directive ignored outside a procedure
1>   
C:\Projekte\DeadPlanet\SourceExt\boost\context\asm\jump_x86_64_ms_pe_masm.asm(215
1>CUSTOMBUILD : fatal error A1010: unmatched block nesting : jump_fcontext
------
Please note that the actual error messages are overwritten by the filename  
- I can only guess at what buffer magic happens there, but I'm pretty sure  
it's not intended.
But that's just a funny anecdote. My actual question is: how do I build  
Boost.Context in Visual Studio? Is there maybe some way to see the  
effective command line when building using Boost.Jam? Is this even the  
right ASM file for x86_64, Visual Studio?
Thanks in advance!
Bye, Thomas