Re: missing function

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

 



Hello,

template definitions must be present to their callers,
ie when gcc finishes preprocessing prova91.cpp, it
must see the contents of prova92.cpp (where you define
prova).

The conventional method of doing this is a bit weird,
but something like this:
change prova92.h to read:

#ifndef _prova92_h
#define _prova92_h
template <class T> void prova(T k);

#include "prova92.cpp"
#endif

To compile, you just compile prova91.cpp, and
everything gets pulled in as needed.

Hope that helps,

Dara

__________________________________
Do you Yahoo!?
Free Pop-Up Blocker - Get it now
http://companion.yahoo.com/

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux