> For the complete documentation index, see [llms.txt](https://docs.proudnet.com/proudnet.cn/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.proudnet.com/proudnet.cn/proudnet/2.setting/c++.md).

# C++

{% hint style="info" %}
C++是基於Visual Studio編寫的。
{% endhint %}

{% hint style="danger" %}
請注意，即使是伺服器程序，也必須引用客戶端庫才能建置和運行。
{% endhint %}

## 1.  ProudNet 頭檔

ProudNet安裝資料夾的include資料夾中有<mark style="color:orange;">ProudNetServer</mark>和<mark style="color:orange;">ProudNetClient</mark>頭檔。

從 Server 專案匯入 <mark style="color:orange;">ProudNetServer</mark> 頭文件，從 Client 專案匯入 <mark style="color:orange;">ProudNetClient</mark> 頭文件，從 Common 專案匯入 <mark style="color:orange;">ProudNetCommon</mark> 頭檔。

<table><thead><tr><th width="226" align="center">位置</th><th align="center">檔案名稱</th></tr></thead><tbody><tr><td align="center">Project</td><td align="center">HeaderFile</td></tr><tr><td align="center">Server</td><td align="center">ProudNetServer.h</td></tr><tr><td align="center">Client</td><td align="center">ProudNetClient.h</td></tr><tr><td align="center">Common</td><td align="center">ProudNetCommon.h</td></tr></tbody></table>

每個專案屬性所包含的庫資料夾的路徑都不同，您必須為Debug和Release屬性設定路徑。

<figure><img src="/files/Feppu5nT62ifSb6JY3vd" alt=""><figcaption><p>ProudNet 安裝路徑/include</p></figcaption></figure>

## &#x20;2. 設定庫 \<ProudNetClient.lib> 目錄路徑

{% hint style="danger" %}
請不要無條件使用下面的路徑，而是根據ProudNet實際安裝的目錄和各個環境來設定。\
\
請參閱[**下載和安裝**](/proudnet.cn/proudnet/1.download.md)以了解按體系結構和平台劃分的庫路徑。
{% endhint %}

<table><thead><tr><th width="226" align="center">位置</th><th align="center">檔案名稱</th></tr></thead><tbody><tr><td align="center">Server</td><td align="center">ProudNetServer.lib , ProudNetClient.lib</td></tr><tr><td align="center">Client</td><td align="center">ProudNetClient.lib</td></tr></tbody></table>

<figure><img src="/files/fpSxBFHWWIYRS3VwIBmD" alt=""><figcaption><p>64位項目, ProudNet 安裝路徑/lib/x64/v140/Debug</p></figcaption></figure>

<figure><img src="/files/QjTaNzroV64rKZU5gKz4" alt=""><figcaption><p>32位項目, ProudNet 安裝路徑/lib/Win32/v140/Debug</p></figcaption></figure>

&#x20;

## 3. 設定庫 \<ProudNetClient.lib> Dependencies 設置

<figure><img src="/files/l7IuZW4f5GDiChBrTbAZ" alt=""><figcaption></figcaption></figure>

將上述過程應用於適用於客戶端和伺服器專案的 lib 檔案。

***

## :arrow\_left:  [**返回**](https://docs.proudnet.com/proudnet.cn/proudnet/2.setting/pages/YF7Z3CPCxDI0T1hoMsHR#2.-pidl)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.proudnet.com/proudnet.cn/proudnet/2.setting/c++.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
