Skip to content

Commit c4a24b0

Browse files
authored
Incorrect build instructions on Windows (#1701)
* Fix incorrect build instructions for Windows * Add link to Visual Studio installer * Refine building instructions for VS2019+
1 parent 7998b24 commit c4a24b0

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

docs/GettingStarted.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,27 +35,44 @@ make sure those are installed on your system.
3535

3636
## Compiling on Windows/Visual Studio
3737

38+
The following steps should be called from the VS developer command prompt.
39+
3840
1. Generate the VS solution
3941

4042
```shell
4143
cd <CppSharp>\build
42-
./build.sh generate -configuration Release -platform x64
44+
<sh> build.sh generate -configuration Release -platform x64
4345
```
4446

4547
2. Compile the VS projects
4648

4749
You can open `CppSharp.sln` and hit F5 or compile via the command line:
4850

4951
```
50-
./build.sh -configuration Release -platform x64
52+
<sh> build.sh -configuration Release -platform x64
5153
```
5254

5355
Building in *Release* is recommended because else we will use the Clang parser
5456
debug configuration, which will be too slow for practical use beyond debugging.
5557

58+
The solution generated will be for Visual Studio 2019.
59+
60+
If you have a more recent version of Visual Studio, you can either:
61+
- install Visual Studio 2019
62+
- install Visual Studio 2019 build tools, from [Visual Studio Installer](https://visualstudio.microsoft.com/downloads/)
63+
- select the payload *MSVC v142 - VS 2019 C++ x64/x86 build tools (v14.29-16.11)*
64+
65+
Please note that Windows isn't natively able to run sh scripts, to remediate this, you can either:
66+
67+
- use the one from Visual Studio if present
68+
- e.g. `C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\Git\usr\bin\sh.exe`
69+
- use the one from [Git for Windows](https://gitforwindows.org/)
70+
- e.g. `C:\Program Files\Git\bin\sh.exe`
71+
72+
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.
73+
5674
## Compiling on macOS or Linux
5775
58-
The following steps should be called from the VS developer command prompt.
5976
6077
1. Generate the VS solution and makefiles
6178

0 commit comments

Comments
 (0)