Open GoogleCodeExporter opened 8 years ago
This is most likely the same problem as Issue #4 which you reported earlier, so
I'll
repost my response here in case it helps people searching:
I had the same problem, the headers were on my system, but gcc/g++ was not
finding
them. What I did was first of all find where the file iostream is located:
$> find / -name "iostream"
/private/var/include/c++/4.0.0/iostream
/private/var/include/gcc/darwin/3.3/c++/iostream
/private/var/include/gcc/darwin/3.3-fast/c++/iostream
Then, you need to include one of those paths in your g++ arguments. So in your
case
you'd do:
$> g++ helloi.cpp -I/private/var/include/c++/4.0.0/ -o helloi
After doing this, it seemed that it was still not finding the file
bits/c++config.h,
so again I did a find on that file. For me it came up with a bunch of matches,
one of
which was in /private/var/include/c++/4.0.0/i686-apple-darwin9/, so I modified
my g++
command to be the following:
$> g++ helloi.cpp -I/private/var/include/c++/4.0.0/
-I/private/var/include/c++/4.0.0/i686-apple-darwin9/ -o helloi
After that, it compiled fine, and I was able to print something with cout. I
hope
this helps you and any others that are having this problem!
Original comment by jeremy.g...@gmail.com
on 19 Oct 2009 at 5:10
Original issue reported on code.google.com by
radif.sharafullin@gmail.com
on 12 Aug 2009 at 10:30