This error has only appeared for me since updating Xcode (and to MacOS Mojave 10.14). Something similar happened with #include <Python>
, which I fixed by instead using #include "python2.7/Python.h".
There is a similar error discussed in Clang doesn't see basic headers. When I try
clang++ -stdlib=libc++ PyTrans.cpp -o -v
I get
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
.
The full error:
warning: include path for stdlibc++ headers not found; pass '-std=libc++' on the command line to use the libc++ standard library instead [-Wstdlibcxx-not-found]
/Users/joe/Documents/Research/EkpPyTransportDist/PyTransport/PyTrans/PyTrans.cpp:20:10: fatal error: 'iostream' file not found
include <iostream>
^~~~~~~~~~
1 warning and 1 error generated.
error: command 'gcc' failed with exit status 1
Any help would be greatly appreciated; I am very new to C++.
Edit: Spacing within brackets.