Closed denis-papin closed 3 years ago
How are you running the examples? Have you tried the pure_rust or the dynamic loading?
I have tried all the modes, but for example, I created a simple fb_test.rs in my project :
#[allow(clippy::unnecessary_wraps)]
pub fn fb() -> anyhow::Result<()> {
let db_file = r#"C:\Users\denis\app\fb\examples\empbuild\EMPLOYEE.FDB"#;
let mut _conn = rsfbclient::builder_native()
.with_dyn_load("./fbclient_ms.lib")
.with_remote()
.db_name(db_file)
.user("sysdba")
.pass("masterkey")
.connect()?;
Ok(())
}
#[cfg(test)]
mod tests {
use crate::fb_test::fb;
#[test]
fn run() {
fb();
}
}
Then I enabled the "dynamic_loading" feature in the Cargo.toml
rsfbclient = { version = "0.17.0", features = ["dynamic_loading"] }
And when I do a cargo build, I run into the LINK ERROR.
Even with the "pure_rust", I get the same LINK ERROR, which is very strange.
I am going to put the code on github in a few minutes.
Actually, when I build on this test project, it's fine. But when I run my test
cargo test --package fb_test --bin fb_test fb_test::tests
I get the link error.
I don't have a windows environment here. But I think you need to specify the firebird.lib
instead of firebird_ms.lib
. Like this example.
Even with the "pure_rust", I get the same LINK ERROR, which is very strange.
Please, try disable the default features when using the pure_rust
:
rsfbclient = { version = "0.17.0", features = ["pure_rust"], default-features = false }
It works in "pure_rust" mode with "default-features = false".
I tried to compile and run the examples on my Windows 10 machine. I bumped into a list of error messages like
So I setup my LIBRARY_PATH and LD_LIBRARY_PATH to a folder this all the firebird DLL Nothing worked.
I have also copied those DLLs in my System32 folder. Same failure.
rustc 1.56.0-nightly Windows 10 (uptodate) Firefox 4 (and tried also with Firefox 3.0.7)
What am I not doing well ?