Browse Source

Incorrect build instructions on Windows (#1701)

* Fix incorrect build instructions for Windows

* Add link to Visual Studio installer

* Refine building instructions for VS2019+
pull/1712/head
aybe 3 years ago committed by GitHub
parent
commit
c4a24b0cce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      docs/GettingStarted.md

23
docs/GettingStarted.md

@ -35,11 +35,13 @@ make sure those are installed on your system.
## Compiling on Windows/Visual Studio ## Compiling on Windows/Visual Studio
The following steps should be called from the VS developer command prompt.
1. Generate the VS solution 1. Generate the VS solution
```shell ```shell
cd <CppSharp>\build cd <CppSharp>\build
./build.sh generate -configuration Release -platform x64 <sh> build.sh generate -configuration Release -platform x64
``` ```
2. Compile the VS projects 2. Compile the VS projects
@ -47,15 +49,30 @@ make sure those are installed on your system.
You can open `CppSharp.sln` and hit F5 or compile via the command line: You can open `CppSharp.sln` and hit F5 or compile via the command line:
``` ```
./build.sh -configuration Release -platform x64 <sh> build.sh -configuration Release -platform x64
``` ```
Building in *Release* is recommended because else we will use the Clang parser Building in *Release* is recommended because else we will use the Clang parser
debug configuration, which will be too slow for practical use beyond debugging. debug configuration, which will be too slow for practical use beyond debugging.
The solution generated will be for Visual Studio 2019.
If you have a more recent version of Visual Studio, you can either:
- install Visual Studio 2019
- install Visual Studio 2019 build tools, from [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/)
- select the payload *MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.29-16.11)*
Please note that Windows isn't natively able to run sh scripts, to remediate this, you can either:
- use the one from Visual Studio if present
- e.g. `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\usr\bin\sh.exe`
- use the one from [Git for Windows](https://gitforwindows.org/)
- e.g. `C:\Program Files\Git\bin\sh.exe`
When opening the solution for the first time on a more recent version than Visual Studio 2019, you will be prompted to retarget projects to one of the platform toolset available on your system.
## Compiling on macOS or Linux ## Compiling on macOS or Linux
The following steps should be called from the VS developer command prompt.
1. Generate the VS solution and makefiles 1. Generate the VS solution and makefiles

Loading…
Cancel
Save