bug-commoncpp
[Top][All Lists]
Advanced

[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 12:00:00 -0600

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]