[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sha.cpp compiler warnings
From: |
Elizabeth Barham |
Subject: |
Re: sha.cpp compiler warnings |
Date: |
12 Dec 2002 18:04:12 -0600 |
The answer may be provided here:
<http://216.239.53.100/search?q=cache:MtxlQUBvZr0C:www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_20263546.html+exporting+template+visual+c%2B%2B+dll&hl=en&ie=UTF-8>
According to the above, any template instances that are used need to
instantiated and dll'exported prior to use, a'la what you did earlier:
extern template class __declspec(dllexport) CBase<long>;
extern template class __declspec(dllexport) CArray<long>;
Perhaps instead of:
class CCXX_CLASS_EXPORT SHADigest<unsigned __int64,64>; // new
if we were to try:
extern template class CCXX_CLASS_EXPORT SHADigest<unsigned __int64,64>;
(or just "template class..."), assuming of course that
CCXX_CLASS_EXPORT expands to "__declspec(dllexport)", it may work.
> Linking...
> digesttest.obj : error LNK2001: unresolved external symbol "public: virtual
> void __thiscall ost::SHADigest<unsigned __int64,64>::putDigest(unsigned char
> const *,unsigned int)" (address@hidden@_K$0EA@@ost@@address@hidden)
> Debug/digesttest.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
This is similar to gcc in that gcc requires an instantiation of a
template if the template is defined in another file (or something like
that).
Anyway, perhaps by defining it as special with the "extern template"
directive it may work.
Thank you for all your help, btw.
Elizabeth
- sha.cpp compiler warnings, Chad Yates, 2002/12/12
- RE: sha.cpp compiler warnings, Chad Yates, 2002/12/12
- Re: sha.cpp compiler warnings, Elizabeth Barham, 2002/12/12
- RE: sha.cpp compiler warnings, Chad Yates, 2002/12/12
- Re: sha.cpp compiler warnings, Elizabeth Barham, 2002/12/12
- RE: sha.cpp compiler warnings, Chad Yates, 2002/12/12
- Re: sha.cpp compiler warnings,
Elizabeth Barham <=
- Re: sha.cpp compiler warnings, Prochnow, Christian, 2002/12/13
- Re: sha.cpp compiler warnings, Elizabeth Barham, 2002/12/13
- RE: sha.cpp compiler warnings, Chad Yates, 2002/12/13
- Re: sha.cpp compiler warnings, Prochnow, Christian, 2002/12/14
- RE: sha.cpp compiler warnings, Chad Yates, 2002/12/12