Giter Club home page Giter Club logo

msvcdocker's Introduction

Build Status

Microsoft Visual C via Wine in Docker

CI with MSVC is unnecessarily difficult. Can't we just use Docker?

It turns out we can-- by running MSVC in Wine. Lots of folks have tried to do this over the years [1], but the setup is involved and fiddly. But scripting complicated setups is what Docker was made for!

The big blocker to getting MSVC in Wine is that even though the software itself works under Wine, the installers don't. We dodge that problem by using Vagrant to drive the MSVC installer in a real Windows OS within VirtualBox, export a snapshot of the installation, and then Docker copies the snapshot into Wine.

Requirements

Building an Image

To create an msvc:15 Docker image:

make clean
make msvc15

MSVC 9, 10, 11, 12, 14, 15, and 16 are supported.

Note: The snapshot step can take quite some time, as the MSVC installers are notoriously gigantic and slow.

Usage

Let's simplify our Docker command:

function vcwine() { docker run -v$HOME:/host/$HOME -w/host/$PWD -u $(id -u):$(id -g) -eMSVCARCH=$MSVCARCH --rm -t -i msvc:15 "$@"; }

The Docker images are setup to run (nearly) everything through Wine. So for example, we can do DOS things like dir:

✗ vcwine cmd /c dir
Volume in drive Z has no label.
Volume Serial Number is 0000-0000

Directory of Z:\host\Users\paleozogt\Development\test\MSVCDocker

 8/31/2018   9:08 PM  <DIR>         .
 8/31/2018   9:21 PM  <DIR>         ..
 8/31/2018   8:55 PM  <DIR>         build
 8/31/2018   9:07 PM         3,421  Dockerfile
 8/31/2018   9:07 PM  <DIR>         dockertools
 8/31/2018   9:07 PM           464  Makefile
 8/31/2018   9:08 PM            45  README.md
 8/31/2018   9:07 PM  <DIR>         test
 8/31/2018   9:07 PM         2,654  Vagrantfile
 8/31/2018   9:07 PM  <DIR>         vagranttools
       4 files                    6,584 bytes
       6 directories     97,359,118,336 bytes free

MSVC's cl

Compiling a Hello World:

✗ vcwine cl test/helloworld.cpp 
Microsoft (R) C/C++ Optimizing Compiler Version 19.15.26726 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

helloworld.cpp
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.15.26726\include\xlocale(319): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
Microsoft (R) Incremental Linker Version 14.15.26726.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:helloworld.exe 
helloworld.obj 


✗ vcwine helloworld.exe
hello world from win x86_64 msvc v1915

Even though its 2018, maybe we want to build for 32-bit:

✗ MSVCARCH=32 vcwine cl test/helloworld.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x86
Copyright (C) Microsoft Corporation.  All rights reserved.

helloworld.cpp
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xlocale(337) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:helloworld.exe
helloworld.obj


✗ vcwine helloworld.exe
hello world from win x86 msvc v1915

LLVM's clang-cl

Clang can cross-compile MSVC-compatible binaries with clang-cl. A linux version is included (ie, it doesn't use Wine), but it still needs the MSVC installation for headers/libs, and Wine is still useful for running the resulting binary.

Compiling a Hello World:

✗ vcwine clang-cl test/helloworld.cpp 


✗ vcwine helloworld.exe
hello world from win x86_64 clang v7

Even though its 2018, maybe we want to build for 32-bit:

✗ MSVCARCH=32 vcwine clang-cl test/helloworld.cpp


✗ vcwine helloworld.exe
hello world from win x86 clang v7

Examples

For more examples, including the use of CMake and high-level language bindings, see the examples subfolder.

Known Issues

  • MSBuild doesn't work, so we can't do things like

    vcwine cmake ../../test -G "Visual Studio 15 2017 Win64"
    vcwine msbuild
    

    If you're using CMake, use the "NMake Makefiles", "NMake Makefiles JOM", or "Ninja" generators.

  • When using LLVM's clang-cl, paths that begin with /U (such as /Users/) will cause strange errors:

    clang-7: warning: '/Users/paleozogt/Development/test/MSVCDocker/build/test/CMakeFiles/CMakeTmp/testCCompiler.c' treated as the '/U' option [-Wslash-u-filename]
    clang-7: note: Use '--' to treat subsequent arguments as filenames
    clang-7: error: no input files
    

    It appears that /Users/... is getting mistaken for a cl flag /U.

References

msvcdocker's People

Contributors

andreas-mausch avatar bilke avatar fzwoch avatar mgerhardy avatar paleozogt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

msvcdocker's Issues

The msvc16 (master) version cannot compile the helloworld

After long running:
....

Step 38/44 : ADD --chown=wine:wine test test
---> 23b6abd82c85
Step 39/44 : RUN umask $WINE_UMASK && cd test && if [ "$MSVC" -gt "10" ] ; then clang-cl helloworld.cpp && vcwine helloworld.exe ; fi && cd .. && rm -rf test
---> Running in 0e30652dd7ae
In file included from helloworld.cpp:1:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/iostream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/istream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/ostream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/ios:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/xlocnum:16:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/streambuf:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/xiosbase:12:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/system_error:14:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/stdexcept:12:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/xstring:14:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/xmemory:13:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/limits:14:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/intrin0.h:18:
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.28.29333/include/intrin.h(56,1): error: expected function body after function declarator
__MACHINE(void * _AddressOfReturnAddress(void))
^
1 error generated.
The command '/bin/sh -c umask $WINE_UMASK && cd test && if [ "$MSVC" -gt "10" ] ; then clang-cl helloworld.cpp && vcwine helloworld.exe ; fi && cd .. && rm -rf test' returned a non-zero code: 1
Makefile:18: recipe for target 'buildmsvc16' failed
make: *** [buildmsvc16] Error 1

WINEPATH -> PATH length limited to 1024 characters

Not sure where in the chain this is happening but I noticed that the PATH variable inside the container is limited to 1024 characters:

Microsoft Windows 10.0.10240 (4.0)

Z:\root>echo %PATH%
C:\tools\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\Hostx64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin\Roslyn;C:\Program Files (x86)\Windows Kits\10\bin\10.0.17763.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\Tools;C:\Program Files (x86)\Windows Resource Kits\Tools;;C:\Users\IEUser\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\CommonExtensions\

So even the base image seems to truncate the default PATH variable set by the MSVC build tools. Fortunately for the basic things this seems working fine. But things may fall apart when adding more custom paths.

Is there a way to increase this limit? It seems that setting the PATH variable from inside a running container allows a bigger buffer.

update base image to Ubuntu 18.04 bionic

we could update the base image to bionic. We then could use the clang-8 or clang-9 package from the updates repository

apt-cache policy clang-8
clang-8:
  Installed: (none)
  Candidate: 1:8-3~ubuntu18.04.2
  Version table:
     1:8-3~ubuntu18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages

apt-cache policy clang-9
clang-9:
  Installed: (none)
  Candidate: 1:9-2~ubuntu18.04.2
  Version table:
     1:9-2~ubuntu18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
        500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages

makefile/vagrantfile doesn't check for dependencies

At least that's what I think I can read out of the log, but probably you understand it better. I guess the Windows Vagrant is build with 5.x Guest Additions and won't work with Virtualbox 6 ultimately causing the networking part to be non-operational and failing the build.

$ make msvc15
./vagranttools/setupbasebox.sh

--2019-03-29 11:47:09--  https://az792536.vo.msecnd.net/vms/VMBuild_20180425/Vagrant/MSEdge/MSEdge.Win10.Vagrant.zip
Resolving az792536.vo.msecnd.net (az792536.vo.msecnd.net)... 152.199.19.161, 2606:2800:133:206e:1315:22a5:2006:24fd
Connecting to az792536.vo.msecnd.net (az792536.vo.msecnd.net)|152.199.19.161|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4575246379 (4.3G) [application/octet-stream]
Saving to: ‘build/MSEdge.Win10.Vagrant.zip’

build/MSEdge.Win10.Vagrant.zip            100%[=====================================================================================>]   4.26G  5.92MB/s    in 27m 24s 

2019-03-29 12:14:34 (2.65 MB/s) - ‘build/MSEdge.Win10.Vagrant.zip’ saved [4575246379/4575246379]

Archive:  build/MSEdge.Win10.Vagrant.zip
 extracting: build/MSEdge - Win10.box  
==> box: Box file was not detected as metadata. Adding it directly...
==> box: Adding box 'Microsoft/EdgeOnWindows10' (v0) for provider: 
    box: Unpacking necessary files from: file:///home/fzwoch/code/MSVCDocker/build/MSEdge%20-%20Win10.box
==> box: Successfully added box 'Microsoft/EdgeOnWindows10' (v0) for 'virtualbox'!
Microsoft/EdgeOnWindows10 (virtualbox, 0)
FIRSTBOOT=1 vagrant up win-msvc15
Bringing machine 'win-msvc15' up with 'virtualbox' provider...
==> win-msvc15: Preparing master VM for linked clones...
    win-msvc15: This is a one time operation. Once the master VM is prepared,
    win-msvc15: it will be used as a base for linked clones, making the creation
    win-msvc15: of new VMs take milliseconds on a modern system.
==> win-msvc15: Importing base box 'Microsoft/EdgeOnWindows10'...
==> win-msvc15: Cloning VM...
==> win-msvc15: Matching MAC address for NAT networking...
==> win-msvc15: Setting the name of the VM: win-msvc15
Vagrant is currently configured to create VirtualBox synced folders with
the `SharedFoldersEnableSymlinksCreate` option enabled. If the Vagrant
guest is not trusted, you may want to disable this option. For more
information on this option, please refer to the VirtualBox manual:

  https://www.virtualbox.org/manual/ch04.html#sharedfolders

This option can be disabled globally with an environment variable:

  VAGRANT_DISABLE_VBOXSYMLINKCREATE=1

or on a per folder basis within the Vagrantfile:

  config.vm.synced_folder '/host/path', '/guest/path', SharedFoldersEnableSymlinksCreate: false
==> win-msvc15: Clearing any previously set network interfaces...
==> win-msvc15: Preparing network interfaces based on configuration...
    win-msvc15: Adapter 1: nat
==> win-msvc15: Forwarding ports...
    win-msvc15: 22 (guest) => 2222 (host) (adapter 1)
==> win-msvc15: Running 'pre-boot' VM customizations...
==> win-msvc15: Booting VM...
==> win-msvc15: Waiting for machine to boot. This may take a few minutes...
    win-msvc15: SSH address: 127.0.0.1:2222
    win-msvc15: SSH username: IEUser
    win-msvc15: SSH auth method: password
==> win-msvc15: Machine booted and ready!
==> win-msvc15: Checking for guest additions in VM...
    win-msvc15: The guest additions on this VM do not match the installed version of
    win-msvc15: VirtualBox! In most cases this is fine, but in rare cases it can
    win-msvc15: prevent things such as shared folders from working properly. If you see
    win-msvc15: shared folder errors, please make sure the guest additions within the
    win-msvc15: virtual machine match the version of VirtualBox you have installed on
    win-msvc15: your host and reload your VM.
    win-msvc15: 
    win-msvc15: Guest Additions Version: 5.2.8
    win-msvc15: VirtualBox Version: 6.0
==> win-msvc15: Mounting shared folders...
    win-msvc15: /vagrant => /home/fzwoch/code/MSVCDocker/build
==> win-msvc15: Running provisioner: ssh...
powershell "Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private"
==> win-msvc15: Running provisioner: ssh...
powershell "NetSh Advfirewall set allprofiles state off" 
==> win-msvc15: Running provisioner: ssh...
cmd /c "reg add HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /d 0 /t REG_DWORD /f /reg:64"
==> win-msvc15: Running provisioner: ssh...
echo 'cmd /k C:\Windows\System32\winrm.cmd quickconfig --force -quiet' > '/cygdrive/c/Users/IEUser/AppData/Roaming/Microsoft/Windows/Start Menu/Programs/Startup/winrm_config.bat'
==> win-msvc15: Running provisioner: ssh...
shutdown -t 0 -s -f
vagrant halt win-msvc15
==> win-msvc15: Attempting graceful shutdown of VM...
    win-msvc15: Guest communication could not be established! This is usually because
    win-msvc15: SSH is not running, the authentication information was changed,
    win-msvc15: or some other networking issue. Vagrant will force halt, if
    win-msvc15: capable.
==> win-msvc15: Forcing shutdown of VM...
vagrant up --provision win-msvc15
Bringing machine 'win-msvc15' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:

vm:
* The 'reload' provisioner could not be found.


make: *** [Makefile:24: buildsnapshot15] Error 1

PowerShell support

Hi,
I tried different time to do this on my own without success. Thanks for the project.

For different reasons I tried multiple times to use your scripts so I want to share issues I had.
About requirements I had to install, beside vagrant-reload also winrm and winrm-elevated vagrant plugins. Commands are

vagrant plugin install winrm
vagrant plugin install winrm-elevated
vagrant plugin install vagrant-reload

I found that other distros (I was using Fedora 31) miss winrm (Debian) so would be nice to add these to requirement or to Vagrantfile file (there's a variable required_plugins).
I had to remove valgrant-libvirt (rpm -e vagrant-libvirt) to be able to install these plugins but it's a specific distro issue, not sure if is worth documenting in some way.
But the most boring (at least for me) issue was the requirements. In order to work they require more than 4GB of RAM (the vagrant image required 4GB, maybe could be reduced to 3 to be able to run in machines with only 4GB?) and 50GB of disk space. I'm trying to do this inside a VM and then export the docker image so at the beginning I didn't plan for such requirements. I think would be worth to state these requirement on README.md.

wine isn't installing

So that builds are replicable, the Dockerfile pins the wine version and apt-get installs winehq-stable=$WINE_VER~xenial. However, this fails with

The following packages have unmet dependencies:
 winehq-stable : Depends: wine-stable (= 4.0~xenial

Thanks to @gerph for pointing this out.

expected Clang 10.0.0 or newer

Hi,

I tried to build the docker image for msvc16.

It took quite some time, then failed with:

Step 39/44 : RUN umask $WINE_UMASK &&     cd test &&     if [ "$MSVC" -gt "10" ] ; then clang-cl helloworld.cpp && vcwine helloworld.exe ; fi &&     cd .. && rm -rf test
 ---> Running in 5c09504c9b57
In file included from helloworld.cpp:1:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/iostream:9:
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/yvals_core.h(494,2): error: STL1000: Unexpected compiler version, expected Clang 10.0.0 or newer.
#error STL1000: Unexpected compiler version, expected Clang 10.0.0 or newer.
 ^
In file included from helloworld.cpp:1:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/iostream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/istream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/ostream:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/ios:11:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/xlocnum:15:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/iterator:12:
In file included from /opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/xutility:15:
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(137,9): error: expected member name or ';' after declaration specifiers
        !_Is_implicitly_default_constructible<_Uty1>::value || !_Is_implicitly_default_constructible<_Uty2>::value)
        ^
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(137,9): error: expected ')'
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(136,23): note: to match this '('
    constexpr explicit(
                      ^
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(218,24): error: expected member name or ';' after declaration specifiers
    constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>)
    ~~~~~~~~~~~~~~~~~~ ^
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(218,24): error: expected ')'
/opt/win/drive_c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/VC/Tools/MSVC/14.27.29110/include/utility(218,23): note: to match this '('
    constexpr explicit(!is_convertible_v<const _Other1&, _Ty1> || !is_convertible_v<const _Other2&, _Ty2>)
                      ^
5 errors generated.

I wasn't watching the logs constantly, but I'm pretty sure Clang 9 was installed (I can also see it here:

ARG CLANG_VER=9.0.0
).

Did I miss something or should you update the version?

Thanks
Andreas

msbuild with cmake

In the known issues the following is stated

  • MSBuild doesn't work, so we can't do things like
vcwine cmake ../../test -G "Visual Studio 15 2017 Win64"
vcwine msbuild

is it just, that manually calling msbuild does not work or is something from the environment missing as well?

At our Windows CI builds we use the following commands

cmake -H. -Bbuild -G "Visual Studio 15 2017 Win64"
cmake --build build --config Release

Can someone test if these commands work with vcwine put before them?

vcwine cmake -H. -Bbuild -G "Visual Studio 15 2017 Win64"
vcwine cmake --build build --config Release

Can't find cl.exe when building msvc10

When building the msvc10 container, it fails when trying to run cl.exe, i.e.:

Step 32/44 : RUN umask $WINE_UMASK &&     cd test &&     MSVCARCH=32 vcwine cl helloworld.cpp && vcwine helloworld.exe &&     MSVCARCH=64 vcwine cl helloworld.cpp && vcwine helloworld.exe &&     vcwine cl helloworld.cpp && vcwine helloworld.exe &&     cd .. && rm -rf test
 ---> Running in e5a3b1aefd2f
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

helloworld.cpp
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323) : warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
Microsoft (R) Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:helloworld.exe 
helloworld.obj 
hello world from win x86 msvc v1600
wine: cannot find L"C:\\windows\\system32\\cl.exe"
The command '/bin/sh -c umask $WINE_UMASK &&     cd test &&     MSVCARCH=32 vcwine cl helloworld.cpp && vcwine helloworld.exe &&     MSVCARCH=64 vcwine cl helloworld.cpp && vcwine helloworld.exe &&     vcwine cl helloworld.cpp && vcwine helloworld.exe &&     cd .. && rm -rf test' returned a non-zero code: 2
make: *** [Makefile:18: buildmsvc10] Error 2
user@linux-jpmj:~/MSVCDocker> 

Full log: log.txt

I was able to build an msvc14 container with no problems. I also ran a make clean before the last attempt, but the result is the same.

subinacl.msi link not found

Hi,

I'm trying to build windev:15 image and I think Microsoft changed the link of subinacl.msi download

    win-msvc15: https://download.microsoft.com/download/1/7/d/17d82b72-bc6a-4dc8-bfaa-98b37b22b367/subinacl.msi
    win-msvc15: Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
    win-msvc15: At C:\tmp\vagrant-shell.ps1:61 char:1
    win-msvc15: + (New-Object System.Net.WebClient).DownloadFile($subinaclUrl, $subinac ...
    win-msvc15: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    win-msvc15:     + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    win-msvc15:     + FullyQualifiedErrorId : WebException

I couldn't find a trustworthy site to download it yet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.