[xmlsec] C++ compile errors under Win32

Slava Kostin sk1978 at mail333.com
Tue Apr 1 03:12:13 PST 2003


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 at 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                          
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cpp_util_2.zip
Type: application/x-zip-compressed
Size: 3318 bytes
Desc: not available
Url : http://www.aleksey.com/pipermail/xmlsec/attachments/20030401/2e399282/cpp_util_2.bin


More information about the xmlsec mailing list