B
Ben
Hi.
I am currently trying to move compilers (VC6 -> VC7 in fact) and I'm
having a few problems (so far exclusively to do with better standard
conformance).
Anyhow, whilst rebuilding a third-party library (let's call it library
B) I'm getting some unresolved externals when it tries to use another
library (library A) that includes code like this in a header:
template<class T>
class EXPORT AClassName
{
...
};
(BTW: EXPORT is defined as __declspec(dllexport) or
__declspec(dllimport) depending on which lib I'm building.)
I first assumed that library A wasn't actually exporting the class
(some screw-up with the def of EXPORT I thought). But after checking
that was OK I realised (doh!) that this is template class and
therefore all members are fully defined in the header file.
So this made we wonder - why might the above class have the EXPORT
keyword in there at all? Surely it's redundant for a template class?
Confused,
Ben.
I am currently trying to move compilers (VC6 -> VC7 in fact) and I'm
having a few problems (so far exclusively to do with better standard
conformance).
Anyhow, whilst rebuilding a third-party library (let's call it library
B) I'm getting some unresolved externals when it tries to use another
library (library A) that includes code like this in a header:
template<class T>
class EXPORT AClassName
{
...
};
(BTW: EXPORT is defined as __declspec(dllexport) or
__declspec(dllimport) depending on which lib I'm building.)
I first assumed that library A wasn't actually exporting the class
(some screw-up with the def of EXPORT I thought). But after checking
that was OK I realised (doh!) that this is template class and
therefore all members are fully defined in the header file.
So this made we wonder - why might the above class have the EXPORT
keyword in there at all? Surely it's redundant for a template class?
Confused,
Ben.