1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Building
The output is `build/lodestone_client.dll` (the client, injected into Minecraft)
and `build/lodestone-inject.exe` (the loader), both 64-bit Windows binaries built
with **mingw-w64 g++**.
## The easy way (Windows): build.exe
Double-click **`build.exe`** in this folder. The first run downloads a portable
toolchain (w64devkit, ~73 MB) into a `w64devkit\` subfolder — nothing is
installed system-wide and no admin rights are needed — then compiles everything.
Later runs skip the download and just recompile. No JDK required: `jni.h` is
vendored under `third_party/jni`.
When it finishes you'll have `build\lodestone_client.dll` and
`build\lodestone-inject.exe`, and it prints the DLL's imports so you can see it
depends only on system libraries.
## With make
If you'd rather use make (or you're on Linux), you need mingw-w64 g++ and GNU
make; no JDK. Then:
**Linux (cross-compile):**
```
sudo apt install g++-mingw-w64-x86-64 make # Debian/Ubuntu
make
```
**Windows, MSYS2 MINGW64 shell:**
```
pacman -S mingw-w64-x86_64-toolchain make
make CXX=g++ CC=gcc OBJDUMP=objdump
```
**Windows, WinLibs + make from cmd.exe** (put WinLibs' `bin` on `PATH`):
```
make
```
To build against a specific JDK's headers instead of the vendored `jni.h`, pass
`JAVA_INC`, e.g. `make JAVA_INC="C:/Program Files/Java/jdk-25/include"`.
## Checking the result
The DLL must import **only** `KERNEL32`, `USER32`, `GDI32`, `OPENGL32` and
`msvcrt` — never `libstdc++-6.dll`, or it fails to inject with "a dependency is
missing". `build.exe` and the `make` build both print this list; check it any
time with:
```
w64devkit\bin\objdump -p build\lodestone_client.dll | findstr "DLL Name"
```