Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build script part to FFI chapter for more clear and smooth learn … #440

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

RoggeOhta
Copy link

Fix #345 #122
Make FFI chapter snappy example workable.

@jamischarles
Copy link

@RoggeOhta Thank you thank you thank you. I've been banging my head wondering how on earth to reference snappy.

@jamischarles
Copy link

FYI: on macOS I didn't need println!("cargo:rustc-link-lib=dylib=stdc++"); this line in the build script.
In fact it caused an error
note: ld: library 'stdc++' not found

@jamischarles
Copy link

jamischarles commented Feb 12, 2024

My working build file:

fn main() {
    // println!("cargo:rustc-link-lib=dylib=stdc++");
    println!("cargo:rustc-link-search=/Users/jac/dev/snappy/build");
}

Didn't realize I needed to ref the build folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snappy ffi example uses u8 instead of c_char
2 participants