Re: Creating makefiles in gcc4.7.0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Try adding changing this

    g++ hello.cpp -o hello

for this:

    g++ -std=c++11 hello.cpp -o hello v


Saludos!
     Juan




On Mon, May 21, 2012 at 12:30 PM, Ángel González <keisial@xxxxxxxxx> wrote:
>
> 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.
>
>



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux