On 20/05/12 23:05, Tim Prince wrote:
> On 5/20/2012 4:03 PM, blessman11 wrote:
>>
>> thanks, I'm a noob and I'm finding it hard to google decent
>> tutorials. so
>> far I'm getting stuck at linking since my hello world program would even
>> compile with this line:
>>
>> g++ hello.cpp -o hello
>>
>> and all I get is an error telling that the compiler can't find the
>> iostream
>> header file. The problem here is linking and how can I solve it?
> That looks like an installation of gcc without a full g++. On some
> linux systems, you must specifically install g++ (same version as your
> gcc). If you build gcc from source, you need at least
> --enable-languages='c c++' (assuming you don't want all the default
> languages). Pre-built versions of g++ for linux (for distros other
> than mine) tend not to work, even though the gcc and gfortran are OK.
I suspect it's an installation without header files. g++ is there, since
it's running the preprocessor.
If you're on Debian/Ubuntu, try installing the build-essentials package.
[Linux C Programming]
[Linux Kernel]
[eCos]
[Fedora Development]
[Fedora Announce]
[Autoconf]
[The DWARVES Debugging Tools]
[Yosemite Campsites]
[Yosemite News]
[Linux GCC]