Just upgraded to Lion from SL, and downloaded xCode from app store.
I go to compile “Hello World” and find that g++ isn’t being found. After some searching, I find it in /Developer/usr/bin. I add this to my path, and try to compile, and now its saying it can’t find iostream.
Clearly, I missed some key setup step but I don’t seem to know what it is. I don’t seem to remember any of this when I installed dev tools for previous mac OS upgrades. Anyone else run into this problem or offer some advice?
The code I’m compling is dirt simple obviously, file name helloworld.cpp
#include <iostream>
int main() { std::cout << "Hello World" << std::endl; }
Just trying
g++ helloworld.cpp
and its saying it can’t find iostream.h (no such file or directory)
Thanks for your help.
What gets downloaded from the App Store is an installer for Xcode 4.1. You then need to manually run the installer. You should find it in
/Applications.