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

Missing Exports from Windows GNU Target #251

Open
SBuercklin opened this issue May 13, 2024 · 1 comment
Open

Missing Exports from Windows GNU Target #251

SBuercklin opened this issue May 13, 2024 · 1 comment
Labels
upstream Upstream issue

Comments

@SBuercklin
Copy link

When I compile the following lib.rs with the accompanying Cargo.toml for x86_64-pc-windows-gnu, the function test_fn is missing from the resulting DLL. However, this code compiles and exposes test_fn for x86_64-unknown-linux-gnu, aarch64-apple-darwin.

I compile the code with cargo zigbuild --release --target *insert_target* using a slightly modified version of the cargo-zigbuild Docker image

source:

#[no_mangle]
pub extern "C" fn test_fn(tag_id_c: i32) -> i32 {
    return tag_id_c;
}

Cargo.toml:

[package]
name = "wincompile"
version = "0.1.0"
edition = "2021"

[dependencies]

[lib]
crate-type = ["cdylib"]
@messense
Copy link
Member

Mostly likely a zig cc issue since there isn't any special handling for DLL in this project, try to reproduce it using zig cc directly and report to zig for help.

@messense messense added the upstream Upstream issue label May 14, 2024
@messense messense changed the title Missing Exports from Windows Target Missing Exports from Windows GNU Target May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants