P
pkoniusz
Hello everyone.
The problem may be obvious, though I'm a bit puzzled by the error
LNK2028 when attempting to utilize my static library. The all methods
of the class defined within that library do not pose any troubles, but
template based methods.
Let's say this is a header:
class LooseFunctions
{
private:
public:
// <== probe, if a given file can be opened for reading
bool CanOpenFileByName(const CHAR *psFileNameC);
template <class ElType>
ElType** AllocateBuffers(const unsigned nRequiredBuffSizeC,
const unsigned nRequiredElSizeC);
}
There is appropriate definition of body content in a cpp file. The
question is why the LNK2028 happend with resect to the above-declared
template method? When I copy and paste the body of that method to the
h file, all works fine. All remining methods (utilized in project)
that are not template based are perfectly happy to be infused with
their body in the cpp. WHat's the matter?
Cheers,
Peter.
The problem may be obvious, though I'm a bit puzzled by the error
LNK2028 when attempting to utilize my static library. The all methods
of the class defined within that library do not pose any troubles, but
template based methods.
Let's say this is a header:
class LooseFunctions
{
private:
public:
// <== probe, if a given file can be opened for reading
bool CanOpenFileByName(const CHAR *psFileNameC);
template <class ElType>
ElType** AllocateBuffers(const unsigned nRequiredBuffSizeC,
const unsigned nRequiredElSizeC);
}
There is appropriate definition of body content in a cpp file. The
question is why the LNK2028 happend with resect to the above-declared
template method? When I copy and paste the body of that method to the
h file, all works fine. All remining methods (utilized in project)
that are not template based are perfectly happy to be infused with
their body in the cpp. WHat's the matter?
Cheers,
Peter.