-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Non pub functions are exported as DLL symbols #133437
Comments
why did you attach |
Without it I can not link the extern "C" void foo(); // #[no_mangle]
extern "C" fn foo() {}
|
I read them, but it there any way I can link rust function in static C library without export it? flowchart
R(Rust dynamic library) --> C(C static library)
C -.->|call foo| R
A(Executable application) --> R
|
Hm, I'm not actually sure that covers DLLs. There is a rationale and documentation for why it must be considered public for staticlibs, rlibs, etc. But this doesn't cover DLLs. E.g. the docs for
It does not mention the binary at all. And if we look to
|
You can use |
I tried this code:
I build a Windows DLL, I use this foo function with other static library written in C.
I think that this function should not be exported as DLL symbols, but it does
Meta
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: