fixup! fix: make sesam-vitale build works even when having a lib.rs file
This commit is contained in:
parent
a1797d65df
commit
27d73c5209
@ -32,4 +32,5 @@ fn main() {
|
|||||||
|
|
||||||
// Link the SESAM_FSV_SSVLIB dynamic library
|
// Link the SESAM_FSV_SSVLIB dynamic library
|
||||||
println!("cargo::rustc-link-lib=dylib={}", env::var("SESAM_FSV_SSVLIB").unwrap());
|
println!("cargo::rustc-link-lib=dylib={}", env::var("SESAM_FSV_SSVLIB").unwrap());
|
||||||
|
// TODO : try `raw-dylib` instead of `dylib` on Windows to avoid the need of the `lib` headers compiled from the `def`
|
||||||
}
|
}
|
||||||
|
@ -6,16 +6,8 @@
|
|||||||
|
|
||||||
use libc::{ c_char, c_void, c_ushort, size_t };
|
use libc::{ c_char, c_void, c_ushort, size_t };
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg_attr(target_os = "linux", link(name = "ssvlux64"))]
|
||||||
#[link(name = "ssvlux64")]
|
#[cfg_attr(target_os = "windows", link(name = "ssvw64"))]
|
||||||
extern "C" {
|
|
||||||
pub fn SSV_InitLIB2(pcRepSesamIni: *const c_char) -> c_ushort;
|
|
||||||
pub fn SSV_LireCartePS(NomRessourcePS: *const c_char, NomRessourceLecteur: *const c_char, CodePorteurPS: *const c_char, ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
|
||||||
pub fn SSV_LireConfig(ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(target_os = "windows")]
|
|
||||||
#[link(name = "ssvw64")]
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn SSV_InitLIB2(pcRepSesamIni: *const c_char) -> c_ushort;
|
pub fn SSV_InitLIB2(pcRepSesamIni: *const c_char) -> c_ushort;
|
||||||
pub fn SSV_LireCartePS(NomRessourcePS: *const c_char, NomRessourceLecteur: *const c_char, CodePorteurPS: *const c_char, ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
pub fn SSV_LireCartePS(NomRessourcePS: *const c_char, NomRessourceLecteur: *const c_char, CodePorteurPS: *const c_char, ZDonneesSortie: *mut *mut c_void, TTailleDonneesSortie: *mut size_t) -> c_ushort;
|
||||||
|
Loading…
Reference in New Issue
Block a user