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

Re: Interesting automake feature



On Mon, Nov 25, 2002 at 10:28:19AM +0200, Jan Ekholm wrote:
> 
> Hi,
> 
> I decided to finally take the plunge and automake:ify a new project when I
> imported into SourceForge. It is a simple project with a few dozen classes
> and it had a simple build system. Following a few tutorials I got automake
> up and running and it seems to compile my project. It is horribly verbose
> and slow, but if this is the way to go, I'll go that path too.
> 
> Anyway, I stumbled on a not so nice feature though, which must be
> something I do totally wrong. It may be something that someone else has
> seen, so I'll ask here. I have C++ files, the source files named "foo.cpp"
> and the headers just "foo".

The header files should be "foo.h" or "foo.hpp", not "foo"!!!

<snip> 
> 	g++ [options] connection.cpp -o connection

This is correct.


> which is really bad. It should of course be:
> 
> 	g++ [options] connection.cpp -c connection

This, if anything, would simply give you a "connection.o", which would
then need to be linked:

  g++ connection.o -o connection

("connection" being the final executable)


-bill!