mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 03:37:45 +00:00
Use raw-dylib
when linking to Oodle on Windows (#83)
This means that the static .lib is no longer required at compile time, but the .dll is still required at runtime. On Linux, the .so is still required at both compile time and runtime, because linking works differently there.
This commit is contained in:
parent
66da9abc90
commit
fe234920f2
2 changed files with 3 additions and 2 deletions
2
USAGE.md
2
USAGE.md
|
@ -26,7 +26,7 @@ Windows and Linux artifacts are built on every commit, under [Github Actions](ht
|
|||
|
||||
Build Kawari with `cargo build`.
|
||||
|
||||
For the World server to function, Kawari needs to be built with `--features oodle`. Place the `oodle-network-shared.lib` (Windows) or `oodle-network-shared.so` (Linux) in a folder created by you named `oodle` before building.
|
||||
For the World server to function, Kawari needs to be built with `--features oodle`. On Linux, place the `oodle-network-shared.so` in a folder created by you named `oodle` before building.
|
||||
|
||||
## Setup
|
||||
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
use std::{ffi::c_void, ptr::null};
|
||||
|
||||
#[cfg(feature = "oodle")]
|
||||
#[link(name = "oodle-network-shared")]
|
||||
#[cfg_attr(windows, link(name = "oodle-network-shared", kind = "raw-dylib"))]
|
||||
#[cfg_attr(not(windows), link(name = "oodle-network-shared"))]
|
||||
unsafe extern "C" {
|
||||
pub fn OodleNetwork1TCP_State_Size() -> isize;
|
||||
pub fn OodleNetwork1_Shared_Size(htbits: i32) -> isize;
|
||||
|
|
Loading…
Add table
Reference in a new issue