[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: sha.cpp compiler warnings
From: |
Chad Yates |
Subject: |
RE: sha.cpp compiler warnings |
Date: |
Thu, 12 Dec 2002 10:36:45 -0800 |
looks like that solves 1 problem, but exposes others. with your change I
get the following warnings (I've left out one that I mention a bit later):
sha.cpp
..\include\cc++/digest.h(382) : warning C4275: non dll-interface class
'ost::SHADigest<unsigned __int64,64>' used as base for dll-interface class
'ost::SHA64DigestHelper'
..\include\cc++/digest.h(382) : see declaration of
'SHA64DigestHelper'
..\include\cc++/digest.h(384) : warning C4251: 'h' : class
'ost::SHATumbler<unsigned __int32>' needs to have dll-interface to be used
by clients of class 'ost::SHA64DigestHelper'
..\include\cc++/digest.h(385) : warning C4251: 'a' : class
'ost::SHATumbler<unsigned __int32>' needs to have dll-interface to be used
by clients of class 'ost::SHA64DigestHelper'
since these are templated classes I tried to reference the template in the
export area like so:
class CCXX_CLASS_EXPORT SHADigest<unsigned __int64,64>; // new
but that gives the following errros:
sha.cpp
..\include\cc++/digest.h(72) : error C2143: syntax error : missing ';'
before '<'
..\include\cc++/digest.h(72) : error C2059: syntax error : '<'
..\include\cc++/digest.h(372) : error C2989: 'SHADigest' : template class
has already been defined as a non-template class
..\include\cc++/digest.h(72) : see declaration of 'SHADigest'
..\include\cc++/digest.h(384) : error C2143: syntax error : missing ','
before '<'
..\include\cc++/digest.h(384) : error C2059: syntax error : '<'
..\include\cc++/digest.h(384) : fatal error C1903: unable to recover from
previous error(s); stopping compilation
so I gather that you can't export templated classes? Any Ideas?
now about the warning I left out above. Following your lead, the final
warning on ost::SHAConstant (from the first batch) can be eliminated with a
another line added to the same WIN32 section:
> ..\include\cc++/digest.h(424) : warning C4275: non dll-interface class
> 'ost::SHAConstant' used as base for dll-interface class
'ost::SHA256Digest'
> ..\include\cc++/digest.h(320) : see declaration of 'SHAConstant'
#ifdef WIN32
class CCXX_CLASS_EXPORT Digest;
class CCXX_CLASS_EXPORT ChecksumDigest;
class CCXX_CLASS_EXPORT CRC16Digest;
class CCXX_CLASS_EXPORT CRC32Digest;
class CCXX_CLASS_EXPORT MD5Digest;
class CCXX_CLASS_EXPORT SHA64DigestHelper; // new
class CCXX_CLASS_EXPORT SHAConstant; // even newer
class CCXX_CLASS_EXPORT SHA1Digest;
class CCXX_CLASS_EXPORT SHA256Digest;
#endif
-----Original Message-----
From: address@hidden
[mailto:address@hidden Behalf Of
Elizabeth Barham
Sent: Thursday, December 12, 2002 10:00 AM
To: Chad Yates
Cc: address@hidden
Subject: Re: sha.cpp compiler warnings
Chad Yates <address@hidden> writes:
> When compiling sha.cpp under under MS Visual Studio 6.0 I recieve the
> following Level 2 warnings:
>
> sha.cpp
> ..\include\cc++/digest.h(406) : warning C4275: non dll-interface class
> 'ost::SHA64DigestHelper' used as base for dll-interface class
> 'ost::SHA1Digest'
> ..\include\cc++/digest.h(381) : see declaration of
> 'SHA64DigestHelper'
>
> ..\include\cc++/digest.h(424) : warning C4275: non dll-interface class
> 'ost::SHA64DigestHelper' used as base for dll-interface class
> 'ost::SHA256Digest'
> ..\include\cc++/digest.h(381) : see declaration of
> 'SHA64DigestHelper'
>
> ..\include\cc++/digest.h(424) : warning C4275: non dll-interface class
> 'ost::SHAConstant' used as base for dll-interface class
'ost::SHA256Digest'
> ..\include\cc++/digest.h(320) : see declaration of 'SHAConstant'
>
> I don't know if this will negatively affect the dll or if it is just a
> meaningless microsoft warning.
>
> Since I'm not an expert on dlls and object-oriented programming, could
> someone make a call on this. I'd be interested to know if it is an issue
or
> not.
Perhaps SHA64DigestHelper needs to be exported.
If you modify the beginning of digest.h so that it appears like this
(adding SHA64DigestHelper), do the warnings go away?
#ifdef WIN32
class CCXX_CLASS_EXPORT Digest;
class CCXX_CLASS_EXPORT ChecksumDigest;
class CCXX_CLASS_EXPORT CRC16Digest;
class CCXX_CLASS_EXPORT CRC32Digest;
class CCXX_CLASS_EXPORT MD5Digest;
class CCXX_CLASS_EXPORT SHA64DigestHelper; // new
class CCXX_CLASS_EXPORT SHA1Digest;
class CCXX_CLASS_EXPORT SHA256Digest;
#endif
Elizabeth
_______________________________________________
Bug-commoncpp mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/bug-commoncpp
- 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 <=
- 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, 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