Re: Creating makefiles in gcc4.7.0

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

 



On 5/20/2012 4:03 PM, blessman11 wrote:


Tim Prince-4 wrote:
On 5/20/2012 6:05 AM, blessman11 wrote:
How do I create makefiles for gcc4.7.0 c++ projects?
Has anybody got a link to an example of a "gcc4.7.0" c++11 project? And
also
a tutorial to writing makefiles for the compiler? (I've looked at the
general documentation and it wasn't really clear enough and mostly feels
a
bit like information overload when first looking at it)
There are plenty of tutorials about using make with g++. If you are at
the beginner level, start with simple cases. If you have specific issues
pertaining to 4.7, you would need to clarify this.

--
Tim Prince



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.

--
Tim Prince



[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