C++ DLL/SO Linux Mint 编译器
Loading...
DLL Source Generator

C++ 库生成器

准备在 Linux Mint 上编译的源代码(Windows 的 .dll 或 Linux 的 .so)。

下面你会找到代码和终端的精确命令。你也可以下载 ZIP 包并在你的文件夹中编译。

源代码 (mylibrary.cpp):

终端的精确命令(Linux Mint)

创建 Windows .dll(MinGW)

1. 安装编译器

sudo apt update && sudo apt install mingw-w64 -y

2. 编译文件

x86_64-w64-mingw32-g++ -shared -o mylibrary.dll mylibrary.cpp

创建 Linux .so(GCC)

1. 安装编译器

sudo apt update && sudo apt install build-essential -y

2. 编译文件

g++ -shared -fPIC -o mylibrary.so mylibrary.cpp