Mail Archives: djgpp/1999/05/16/08:22:51
Sean wrote:
> > However, it works perfectly if I get rid of testdef.cpp and put the
> > definition of testmethod in header.h or at the top of main.cpp, so it
> > doesn't look like it's anything to do with my code, but rather something
> > to do with the linker. Does anybody know if this is the case, and if so,
> > what should be done?
> >
> > Thanks in advance,
> > Andrew Geers
>
> All templates are like that. Generally, I think, it's preferred to
> #include the cpp file at the end of the header file, but the cpp file
> needs to be #include'd somewhere, not just in the project file. Well,
> maybe there's a compiler unlike that, but that's ANSI C++.
To get around that would require some sort of linker-based compiler to
make the code for the templates. I think the MSVC++ 5/6 does that.
--
(\/) Endlisnis (\/)
s257m AT unb DOT ca
Endlisnis AT HotMail DOT com
ICQ: 32959047
- Raw text -