## Check out the code Make a work directory in which you want to check out the code. ```text $> git clone https://github.com/libplctag/libplctag.git ``` Or you can download one of the releases directly from GitHub. ## Build the Make build files Go into the project build directory (the build directory may not already exist)/ ```text $> cd libplctag $> mkdir -p build $> cd build ``` Run cmake (use "Release" for a release build and "Debug" for a debug build). ```text $> cmake .. -DCMAKE_BUILD_TYPE=Release ``` The ".." above is important. ## Compile the code Run make ```text $> make ``` The binaries will be in the `build/bin_dist` directory. This includes the libraries (static and dynamic) and the executables for the test and example programs.
时间: 2023-11-21 13:48:54 浏览: 123
## 检出代码
在您想要检出代码的工作目录中创建一个工作目录。
```text
$> git clone https://github.com/libplctag/libplctag.git
```
或者您可以直接从GitHub下载其中一个发布版本。
## 构建Make构建文件
进入项目构建目录(构建目录可能不存在)。
```text
$> cd libplctag
$> mkdir -p build
$> cd build
```
运行cmake(对于发布构建,请使用"Release",对于调试构建,请使用"Debug")。
```text
$> cmake .. -DCMAKE_BUILD_TYPE=Release
```
上面的".."很重要。
## 编译代码
运行make命令。
```text
$> make
```
生成的二进制文件将位于`build/bin_dist`目录中。其中包括库(静态和动态)以及测试和示例程序的可执行文件。
阅读全文
相关推荐

















