[xmlsec] C++ compile errors under Win32

Slava Kostin Slava Kostin <sk_home@mail333.com>
Tue, 1 Apr 2003 14:12:13 +0300


------------FA5E6028BDAA3F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hello, Aleksey.

I tried to compile my C++ program under win32 (I was compiling a DLL)
and has received a lot of such compile errors:

z:\sdk\libxmlsec\include\xmlsec/strings.h(26) :
     error C2201:
     'xmlSecNs' :
     must have external linkage in order to be exported/imported
z:\sdk\libxmlsec\include\xmlsec/strings.h(26) :
     error C2734:
     'xmlSecNs' :
     const object must be initialized if not extern
z:\sdk\libxmlsec\include\xmlsec/strings.h(26) :
     error C2133:
     'xmlSecNs' :
     unknown size

There are errors in macro XMLSEC_EXPORT_VAR definition in file
xmlsec/exports.h. Such error influence on DLL compile process under
Win32:

existing string:
#        define XMLSEC_EXPORT_VAR __declspec(dllimport)

necessary for succesfull compilation:
#        define XMLSEC_EXPORT_VAR __declspec(dllimport) extern

Yauheni Akhotnikau (eao197@intervale.ru) has described me where the
problem is and proposed you to use his library cpp_util_2 (see
attached file). This library declares useful macros not only for MSC
compiler but also for Watcom, Borland etc.

-- 
Best regards,
 Slava                          
------------FA5E6028BDAA3F
Content-Type: application/x-zip-compressed; name="cpp_util_2.zip"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="cpp_util_2.zip"

UEsDBBQAAgAIAPySQS02EkMaoAAAANsAAAAMACQAY3BwX3V0aWwuaHBwCgAgAAAAAAABABgAAI6Y
jl5pwgEfVAvVPfjCAR9UC9U9+MIB09dS5OXijEnLzElVSC4oiC8tycyJN9LP0Idx9DIKCkAqkooy
U9MUzj38+eKlwpcHL18rPHn9X+HRx6dfFd48ePXh3cd3j/R4uYAKz7978ur1v+8Pnn4CK/ut8FHh
3fsPT588ff307Yv/b14ovPv49t2jt79R9Gnpg/QqZ+Yl55SmpCrYoLgkJTWtGOQKOzwqSlKTS+KT
83MLgP4ogioGAFBLAwQUAAIACAB3kkEtzkQUtVIBAAB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