#Compile to autocxx error with crate-type cdylib

6 messages · Page 1 of 1 (latest)

pine osprey
#

Everything works and runs fine if I have a main.rs & main function but when I try to compile with crate-type = "cydlib" I get the attached error message

#

I can even confirm that the file at that path exists, I ran nano /home/virx/Documents/rlutilities-rs/target/debug/build/rlutilities-rs-a98cce3a4fe908e8/build-script-build and it pulled up the binary

#

this is my Cargo.toml:

[package]
name = "rlutilities-rs"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
autocxx = "0.23.1"
cxx = "1.0.83"

[build-dependencies]
glob = "0.3.0"
autocxx-build = "0.23.1"
miette = { version = "5", features = ["fancy"] }

[profile.release]
lto = true
strip = true
#

compiling to cdylib is essential for the project I want to work on but I have 0 idea what to do here...

#

I'm not sure what files are really even needed to debug this error

#

can autocxx even compile to cdylib at all?