> For the complete documentation index, see [llms.txt](https://docs.otland.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.otland.net/compiling/compiling-on-windows-vcpkg.md).

# Compiling on Windows (vcpkg)

**1. Download/install the required software**

To compile on Windows, you will need to download and install:

* [Git](https://git-scm.com/download/win)
* [Visual Studio 2022 Community](https://visualstudio.microsoft.com/vs/) (compiler, make sure to install with the English language pack)
* [vcpkg](https://github.com/Microsoft/vcpkg) (package manager)

**2. Set up vcpkg**

Make sure to follow full installation of vcpkg, per [Official Quickstart](https://github.com/Microsoft/vcpkg#quick-start) execute the following in *cmd* or *Powershell*:

To open Powershell navigate to your desired directory and choose `Open PowerShell window here` (shift + right click).

If you prefer `cmd` (command prompt) click on your `Start` windows button or just use the windows key on your keyboard and search for `cmd` then navigate to your desired directory using `cd` e.g. you want to have your vcpkg folder on root of your C drive:

```
cd C:\
```

then you can safely proceed with configuring vcpkg (may require administrator elevation)

```
git clone https://github.com/Microsoft/vcpkg && cd vcpkg && .\bootstrap-vcpkg.bat && .\vcpkg integrate install
```

**3. Download the source code**

```
git clone --recursive https://github.com/otland/forgottenserver.git
```

**4. Install libraries**

Choose one set of libraries, depending on the target platform and execute the following in *Git Bash* or *Powershell*:

Note: **boost-filesystem** is not needed from [4b800b2](https://github.com/otland/forgottenserver/commit/4b800b20558f24344c5024fb3cb9a4974ebad90e) onwards

* For 64-bit (x64) build:

  ```
  .\vcpkg install --triplet x64-windows boost-iostreams boost-asio boost-system boost-filesystem boost-variant boost-lockfree luajit libmariadb pugixml cryptopp fmt
  ```
* For 32-bit (Win32) build:

  ```
  .\vcpkg install boost-iostreams boost-asio boost-system boost-filesystem boost-variant boost-lockfree luajit libmariadb pugixml cryptopp fmt
  ```

**5. Build**

1. **Open `vc17/theforgottenserver.vcxproj`**. This should launch Visual Studio.
2. Choose build configuration from the drop downs (Debug or Release and Win32 or x64). For best performance choose Release & x64.
3. To start compiling **press F7**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.otland.net/compiling/compiling-on-windows-vcpkg.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
