Mail Archives: djgpp/1997/12/03/10:00:25
Martin Bernreuther wrote:
>
> Hi,
>
> I use an own template list which is persistent. There are methods
> like Load and Save which call Load and Save methods of the list
> elements. I also used this list for non persistent objects.
> Now I have the problem that djgpp tries to build instances of
> the Load and Save methods of the list even if these methods are
> never used in the code. This is not the behaviour described in
> the Stroustrup book. Is there a way to make the compiler
> just to build the used methods. I'm porting a program from
> M$ VC++ where there are no problems!
>
> Bye
> Martin
This is one of GCC's genuine limitations... template instantiation...
However CYGNUS made a patch for gcc which fixes this problem...
ftp://ftp.cygnus.com/pub/g++/gcc-2.7.0-repo.gz
However if you dont feel like recompiling your compiler use the #pragma
interface, #pragma implementation "filename.h" stuff described in the
gcc info thingy..
greetinx,
Peter
- Raw text -