The inability to create rust-libc using load when rustc has a movie

I successfully created musl configured by rustc by following this link

My attempt to build a project (which builds perfectly using incompatible rust) failed when I used cargo rustc -- --target=x86_64-unknown-linux-musl

  'error: could not find crate `libc` with expected target triple x86_64-unknown-linux-musl' 

Then I tried to create the rust-libc library using code from the box. To be more precise, I used the cargo command to build rust-libc , I just added --target=x86_64-unknown-linux-musl to the command. This time he was unable to report:

 'error: could not find native static library `c`, perhaps an -L flag is missing?`' 

I have two questions:

  • Is musl configured to configure cargo in order to use cargo build --target=x86_64-unknown-linux-musl ?

  • How can I address this question:

     'error: could not find native static library `c`, perhaps an -L flag is missing?' 
+6
source share
1 answer

This helped me create libc:

rustc --target = x86_64-unknown-linux-musl / address-of-libc / lib.rs --crate-name libc -crate-type lib -L / address-of-musldist / musldist / lib / - out- dir = / your-selected-address / target --cfg feature = \ "default \" --cfg feature = \ "load-build \" --emit = dep-info, link

+3
source

All Articles