Mail Archives: djgpp/2000/11/04/14:00:20
Paulo J. Matos aka PDestroy <pdestroy AT netcabo DOT pt> wrote:
> Hi,
> I'm having a problem in compiling something. I have a relatively big project
> with some files to compile.
> One of the classes I have is a C++ template so the extension is lists.hpp
> and the header is lists.h.
And that's your problem, already. Make doesn't know about .hpp
files. In particular, it doesn't follow your reasoning that .hpp would
be a C++ source file that can be compiled into a lists.o object files.
You should name the source file lists.cpp or lists.cc, otherwise
'make' can't guess it's a C++ file. Or you can add your own suffix
or pattern rule for .hpp files.
OTOH, for typical use of templates, I seem to remember there usually
is no separately compilable code anyway, so it would be wrong to put
'lists.o' into the list of files to be built.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -