In my environment, I couldn't include <cstring>
.
My g++ version is 4.9.3 (Homebrew gcc49 4.9.3).
The error is:
- /usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/cstring:42:20: fatal
error: string.h: No such file or directory
"#include string.h"
But, in another environment (g++ 4.8.4[Ubuntu 4.8.4-2ubuntu1~14.04.3]), I can include <cstring>
and run.
What's the problem and how do I solve it?
[P.S.] Maybe, I misunderstood about the problem. I tried to run my previous code, but got an error like this:
/usr/local/Cellar/gcc49/4.9.3/include/c++/4.9.3/cassert:43:20: fatal error: assert.h: No such file or directory
#include <assert.h>
Then, I can't run my code. It is a g++'s problem.
I checked this article, but this procedure is not working. I already installed xcode-select (commmad line tool) and I uninstalled xcode-select and reinstalled xcode-select, but it's not working.
Building C++ not working in OSX 10.9
Reinstalling the heaaders fixed my issue:
open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With