Skip to content

Commit

Permalink
Add arch and config to VS
Browse files Browse the repository at this point in the history
  • Loading branch information
seladb committed Sep 8, 2023
1 parent 23d9b24 commit 736cb53
Showing 1 changed file with 35 additions and 7 deletions.
42 changes: 35 additions & 7 deletions docs/quickstart/_vs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import ReleaseLink from '@site/src/components/ReleaseLink';

Before installing PcapPlusPlus make sure you have the prerequisites installed for [Visual Studio](./install/vs#prerequisites). Please notice that the currently supported versions of Visual Studio are 2019 and 2022.

Download the pre-compiled package for the Visual Studio version you have (VS2019 or VS2022) from the <ReleaseLink/>.
Download the pre-compiled package for the Visual Studio version you have (VS2019 or VS2022) from the <ReleaseLink/>. Please notice there are 4 different configurations
for each VS version - x64 / Win32 and Debug / Release. It's important to remember because you'll use them later.

### Step 2 - create your first app

Go to: `Drive:\path\to\your\package\ExampleProject`.
Go to: `Drive:\path\to\your\package\example-app`.

Make sure you see the following files:

Expand All @@ -32,28 +33,55 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

<Tabs>
<TabItem value="vs2019" label="VS2019" default>
<TabItem value="vs2019-x64" label="VS2019 - x64" default>

```cmd
cmake -G "Visual Studio 16 2019" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
cmake -A x64 -G "Visual Studio 16 2019" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
```

</TabItem>
<TabItem value="vs2022" label="VS2022">
<TabItem value="vs2019-win32" label="VS2019 - Win32" default>

```cmd
cmake -G "Visual Studio 17 2022" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
cmake -A Win32 -G "Visual Studio 16 2019" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
```

</TabItem>
<TabItem value="vs2022-x64" label="VS2022 - x64">

```cmd
cmake -A x64 -G "Visual Studio 17 2022" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
```

</TabItem>
<TabItem value="vs2022-win32" label="VS2022 - Win32">

```cmd
cmake -A Win32 -G "Visual Studio 17 2022" -S . -B build -DPcapPlusPlus_ROOT=Drive:\path\to\your\package -DPCAP_ROOT=Drive:\path\to\npcap-sdk -DPacket_ROOT=Drive:\path\to\npcap-sdk
```

</TabItem>
</Tabs>

Build the app:

<Tabs>
<TabItem value="debug" label="Debug">

```cmd
cmake --build build --config Debug
```

</TabItem>
<TabItem value="release" label="Release">

```cmd
cmake --build build
cmake --build build --config Release
```

</TabItem>
</Tabs>

An executable file will be created which contains the compiled app. You can now run it and should be able to see the following output:

```cmd
Expand Down

0 comments on commit 736cb53

Please sign in to comment.