All Projects → eruffaldi → wine_vcpp

eruffaldi / wine_vcpp

Licence: other
Using Visual Studio Compiler with Wine

Programming Languages

AngelScript
46 projects
Batchfile
5799 projects
python
139335 projects - #7 most used programming language
CMake
9771 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to wine vcpp

RCCpp DX11 Example
Runtime Compiled C++ example based on the Dear ImGui DirectX11 Example
Stars: ✭ 35 (+40%)
Mutual labels:  visual-studio
machine.specifications.runner.visualstudio
A test adapter for Visual Studio and dotnet test for the Context/Specification framework Machine.Specifications
Stars: ✭ 30 (+20%)
Mutual labels:  visual-studio
csr-spi-ftdi
USB SPI programmer/debugger for CSR BlueCore bluetooth chips, based on FTDI USB to UART converter, for Linux and Windows
Stars: ✭ 473 (+1792%)
Mutual labels:  wine
dockingpanes
A Visual Studio style docking windows library for Qt Widgets based applications
Stars: ✭ 52 (+108%)
Mutual labels:  visual-studio
vs-shell
GitHub action to set up the Visual Studio shell environment
Stars: ✭ 36 (+44%)
Mutual labels:  visual-studio
xml-semantic-external-parser
A semantic external parser for XML files that can be used together with GMaster, PlasticSCM or SemanticMerge. Supports various XML formats, such as the Visual Studio project format.
Stars: ✭ 15 (-40%)
Mutual labels:  visual-studio
CleanArchitectureDemo
This is a demo project built on .NET Core 3.1 Clean Architecture. Please refer the articles mentioned in the readme to learn more.
Stars: ✭ 33 (+32%)
Mutual labels:  visual-studio
hash-dark-vscode
A minimal dark vscode theme inspired by Hashnode blog syntax highlighting.
Stars: ✭ 12 (-52%)
Mutual labels:  visual-studio
C-Sharp-Learning-Journey
Some of the projects i made when starting to learn c#, winfroms and wpf
Stars: ✭ 95 (+280%)
Mutual labels:  visual-studio
git-tools
This extension provides a git changes tool window, a graphical git history viewer and menus to launch Git Bash, Git Extenstions and TortoiseGit.
Stars: ✭ 72 (+188%)
Mutual labels:  visual-studio
wxWidgetsTemplate
A template project for wxWidgets C++, with pre-set files and IDE projects, and allows for easy updates to wxWidgets
Stars: ✭ 13 (-48%)
Mutual labels:  visual-studio
gnutls
Unofficial GnuTLS with added custom native Visual Studio project build tools. GnuTLS: GnuTLS is a secure communications library implementing the SSL, TLS and DTLS protocols and technologies around them.
Stars: ✭ 17 (-32%)
Mutual labels:  visual-studio
vscode-theme
A modern, good-looking, productivity-increaser theme for Visual Studio Code
Stars: ✭ 46 (+84%)
Mutual labels:  visual-studio
botsfromzerotohero
This repository contains all the code samples of "Developing Intelligent Bots from Zero to Hero" channel9/MVA course.
Stars: ✭ 14 (-44%)
Mutual labels:  visual-studio
vscode-legacy
A vscode plugin for probe-rs
Stars: ✭ 18 (-28%)
Mutual labels:  visual-studio
RDO.Net
Relational Data Objects for .Net
Stars: ✭ 23 (-8%)
Mutual labels:  visual-studio
WindowsCommunityToolkit
The Windows Community Toolkit is a collection of helpers, extensions, and custom controls. It simplifies and demonstrates common developer tasks building UWP and .NET apps for Windows 10 and Windows 11. The toolkit is part of the .NET Foundation.
Stars: ✭ 4,934 (+19636%)
Mutual labels:  visual-studio
TPFanCtrl2
ThinkPad Fan Control 2 (Dual Fan) for Windows 10 and 11
Stars: ✭ 28 (+12%)
Mutual labels:  visual-studio
SmartCommandlineArgs
A Visual Studio Extension which aims to provide a better UI to manage your command line arguments
Stars: ✭ 70 (+180%)
Mutual labels:  visual-studio
visual-studio-fonts
Workaround for missing Line Spacing feature in Visual Studio.
Stars: ✭ 18 (-28%)
Mutual labels:  visual-studio

Introduction

Using Visual Studio Compiler inside Wine (e.g. OSX) for x86 and x64 builds

Status:

  • simple manual builds work
  • /Zi requires patch to wine (below)

Blocker:

  • nmake uses special flags and wine has problems
  • cmake has performance hits during compiler checks

Requirements

In addition to wine it is necessary to install samba3 to compile debug information with PDB.

Visual Studio 2015 free edition.

Update: Microsoft is now providing Visual Studio 2015 C++ compiler as standalone package: http://landinghub.visualstudio.com/visual-cpp-build-tools

Creation

  1. Have at hand Visual Studio 2015 free version and

    • put VC folder under /VC
    • put Windows 8.1 SDK under /kit8.1
    • put Windows 10 SDK under /kit10
    • put tools under /tools
    • put mt under /mt

About 7200 files for 2.51GB. Note that the pure x86 should be able to stay in 1GB. To make pure x86 remove all the folders named as follows: arm arm64 x64 amd64 amd64_arm amd64_x86 x86_arm x86_amd64

  1. replace the files .bat below with the ones provided in this repository
  • VC/bin/vcvars32.bat
  • VC/bin/x86_amd64/vcvarsx86_amd64.bat
  • VC/vcvarsall.bat
  1. inside wine mount this folder on c:\VC (e.g. using symbolic link to .wine/drive_c/VC)

Patching

api-ms-win-crt-string-l1-1-0.dll

Under wine 1.8.x the function memcmpi_l is not implemented and PDB stuff of cl is not working. We need to replace it with a stub calling memcmpi.

Go into patch and do make. It is configured to generate that DLL using one recent spec file from Wine, for x86.

Usage

Note: Visual Studio 2015 comes with the following 6 variants: two hosting platforms amd64,x86 and three target platforms amd64,x86,arm. Under OSX it is necessary to use 32bit (x86) hosting, while under Linux it is also possible to use 64bit hosting.

Use the following commands for creating the correct environment

Windows 10 - x86 over x86 (pure)

WINEDEBUG=-all wine cmd /K c:\\VC\\VC\\vcvarsall.bat x86 10.0.10150.0

Windows 10 - x64 over x86 (x86_amd64)

WINEDEBUG=-all wine cmd /K c:\\VC\\VC\\vcvarsall.bat x86_amd64 10.0.10150.0

Note: the version number at the end of the string depends on your SDK installation

Note: Windows 10 uses kit8.1 libraries for kernel Note: the Windows 8.1 option is not available due to the lack of stdio.h in kit8.1

WINEDEBUG=-all wine cmd /K c:\\VC\\VC\\vcvarsall.bat x86 8.1

Two bash aliases can be created

alias vc64="WINEDEBUG=-all wine cmd /K \"c:\\VC\\VC\\vcvarsall.bat x86_amd64 10.0.10150.0\""
alias vc86="WINEDEBUG=-all wine cmd /K \"c:\\VC\\VC\\vcvarsall.bat x86 10.0.10150.0\""

Alternatively it is possible to create vc64.sh shell script that invokes the command on the command line and then exits

WINEDEBUG=-all wine cmd /K "c:\\VC\\VC\\vcvarsall.bat x86_amd64 10.0.10150.0 && $1 && exit"

CMake

There are two options: the first is to run cmake outside wine, the second inside wine. In the former we define a toolchain that uses wine+cl as compiler, in the latter we use cmake for Windows.

Cross compilation with cmake can be achieved in two ways: from outside Wine using a toolchain that invokes Wine at every step, or inside Wine using cmake for windows.

Crosscompilation

This employs two helper scripts (winecl and winelink) that call wine

Outside Wine

Fails due to lack of rc.exe in compiler testing. Compiler testing can be avoided using the variable CMAKE_C_COMPILER_WORKS=1:

Outside Wine

From outside wine we have a missing source file

Inside Wine

TODO for compiler MSVC 19.0.24215.1

We provide a toolchain file but the recognition of the compiler is very slow, although it improved from Wine 1.8 to

  cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake ..

Errors

CMake, after solving the missing memcmpi_l function, fails due to lack of rc.exe in compiler testing. ompiler testing can be avoided using the variable CMAKE_C_COMPILER_WORKS=1:

     cmake -DCMAKE_CXX_COMPILER_WORKS=1 -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=../toolchain.cmake  ..

and then make CMAKE_RC_COMPILER point to the alternative implementation from mingw (windres):

     CMAKE_RC_COMPILER:FILEPATH=...

Windres can be found on: https://sourceforge.net/projects/mingw/files/MinGW/Base/binutils/binutils-2.25.1/binutils-2.25.1-1-mingw32-bin.tar.xz/download

We cannot use: -G "Visual Studio 14 2015"

#Next

Solve CMake issue and test with Kinect 2 SDK

TODO

Solve CMake issue and test with: Kinect 2 SDK and pre-compiled OpenCV 3.3

Related

Kudos to http://ooo-imath.sourceforge.net/wiki/index.php/Cross-compiling_for_Windows#Visual_Studio_2015

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].