fixup! fix: make sesam-vitale build works even when having a lib.rs file

This commit is contained in:
Florian Briand 2024-07-27 16:20:10 +02:00
parent a1797d65df
commit 27d73c5209
Signed by: florian_briand
GPG Key ID: CC981B9E6B98E70B
2 changed files with 4 additions and 11 deletions

View File

@ -32,4 +32,5 @@ fn main() {
// Link the SESAM_FSV_SSVLIB dynamic library
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`
}

View File

@ -6,16 +6,8 @@
use libc::{ c_char, c_void, c_ushort, size_t };
#[cfg(target_os = "linux")]
#[link(name = "ssvlux64")]
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")]
#[cfg_attr(target_os = "linux", 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;