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

Compilation Issue: Linking to std in no_std Environment #1329

Open
Moadao opened this issue Mar 22, 2024 · 0 comments
Open

Compilation Issue: Linking to std in no_std Environment #1329

Moadao opened this issue Mar 22, 2024 · 0 comments

Comments

@Moadao
Copy link

Moadao commented Mar 22, 2024

Context:
I've been tinkering with embedded lately and using cxx to utilize some C++ code with Rust without the standard library (no std). This repository had a promising example, but I hit a snag during compilation.

Problem:
As I compile the example in the repository for running cxx without the standard library, I ran into a little hiccup. The compilation process threw up an error message that said:

rust-lld: error: unable to find library -lstdc++

It seems like the linker (rust-lld) is having a tough time tracking down the standard C++ library (libstdc++). My guess is there might be a small hiccup in the configuration somewhere causing it to slip through the cracks.

Please note that I tried using the current version as well as this version:

[dependencies]
cxx = { version = "1.0.58", default-features = false, features = ["alloc"] }

In addition, I've already communicated with the repository owner regarding this issue, and it turns out he is facing the same problem.

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

No branches or pull requests

1 participant