ruabmbua / enet-sys

Raw rust bindings to the enet C library
MIT License
19 stars 14 forks source link

Add `links = "enet"` to Cargo.toml to make it work with rustc-msvc #10

Closed Boscop closed 5 years ago

Boscop commented 6 years ago

Please add links = "enet" to Cargo.toml, to only link to enet once, if two deps depend on enet-sys. And without links = "enet" it doesn't build, at least with rustc-msvc I get this error:

error: could not find native static library `enet`, perhaps an -L flag is missing?

error: aborting due to previous error

error: Could not compile `enet-sys`.

But with links = "enet", everything works with rustc-msvc.

spearman commented 6 years ago

When I build on Windows command prompt, cmake places enet.lib into build/Debug or build/Release depending on the type of build and the linker could not find it in these subdirectories. Created a pull request (#11) that checks whether the build is debug or not on Windows and sets the link search path accordingly. I went ahead and added the links = "enet" line to the manifest. Does this patch work for you?

ruabmbua commented 5 years ago

Resolved by #11