Steven T. Hatton wrote:
I think for now, I just need to find out [how] to go from start to `make install'.
Here goes: you've got a file hello.cc that you want to compile: Create Makefile.am: This is another point of consternation for me. I see a lot of C++ source with
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 02 March 2004 01:32 pm, John Lamb wrote: the .cpp extension. It's not a big deal, but it does complicate things such as file type filtering, etc. And most C++ source I've seen comes with headers in *.h files. I tend to favor .hpp, since the .h is used in C as well as C++. I looked in the gcc-3.2.3/libstdc++-v3/src/ and .cc is the winner. They don't have any header files, so I can't judge by that.
== ## Process this file with automake to produce Makefile.in
Oh, and the bloody ## is some kind of magic comment, no? ...
== # -*- Autoconf -*-
Do I smell Emacs?
# aclocal # autoheader # automake -a # autoconf Just so you don't keep repeating these, write a script 'bootstrap': == #! /bin/sh
aclocal \ && autoheader \ && automake --gnu --add-missing \ && autoconf == Then if things don't do what you want, just do # ./bootsrap and they will.
The real work of autotools is usually sorting out libraries, but find out first how it compiles a simple program, then move on. Libraries cause the real problem because they may have to go in specific locations. Hence the --prefix= option, which, by the way, you've already got. I tend to approach that in the opposite direction. I put things where I want
Thanks. That looks quite usefull. I need to try what Phillipp suggested as well. them, and use /etc/ld.so.conf or LD_LIBRARY_PATH to find them. I shoot myself in the foot every once in a while, but I find it easier than to risk someone else overwriting my .so's if they're in the 'standard' location. It also saves having to su to do installs.
Also, shared libraries are harder than static ones, but necessary for some C++ development, but autools will handle all the complexity for you with a little help from libtoolize.
I actually made that work once for a toy project.
JDL
STH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFARpafwX61+IL0QsMRAkDUAKDM8hoE7owLPgOdZV9kIvZ70CxYyACfVPjm /JSL74vOSMWrJoLcBLIFWEg= =brkK -----END PGP SIGNATURE-----