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
fatal error: 'stdlib.h' file not found when including cstdlib header #1919
Comments
That header doesn't compile in a regular C compiler either, so I think the behavior here is right, but please reopen if I've missed something. |
I'm sorry, I obviously mistyped. The repro file correctly has |
Fixes #1919, as otherwise we peek the wrong include paths unless you pass "-x c++" or such.
Ah, I see what's going on... Right now bindgen assumes C input unless I opened #1933 to also look at the filename. |
Fixes #1919, as otherwise we peek the wrong include paths unless you pass "-x c++" or such.
Fixes rust-lang#1919, as otherwise we peek the wrong include paths unless you pass "-x c++" or such.
There are similar issues (e.g. #1521) but I can't understand how to fix this. I don't think this is a bindgen issue, but can't unterstand what underlying component is causing this. My system is Ubuntu 20.10, with llvm & co installed.
Repro: Modify https://github.com/fitzgen/bindgen-tutorial-bzip2-sys.git like this:
rename
wrapper.h
towrapper.hpp
wrapper.hpp
and modify
build.rs
:The bzip.h include is useless but I wanted to start from a basilar working repo.
Substituting
#include <cstdlib>
with#include <stdlib.h>
makes bindgen happy.cargo build
resultThe text was updated successfully, but these errors were encountered: