[xmlsec] mscrypto link error with 1.18 unresolved external reference

Aleksey Sanin aleksey at aleksey.com
Thu Jun 16 09:43:58 PDT 2011


http://msdn.microsoft.com/en-us/library/td1esda9%28v=vs.80%29.aspx

These are "safe" versions of strcpy(). The code you posted is required 
for MinGW since
it doesn't define these functions.

Aleksey


On 6/16/11 9:37 AM, EdShallow wrote:
> ... in crypto.c in mscrypto ...
>
> Ed
>
> On Thu, Jun 16, 2011 at 12:36 PM, EdShallow <ed.shallow at gmail.com 
> <mailto:ed.shallow at gmail.com>> wrote:
>
>     Hi Aleksey,
>
>        Thanks for the quick response.
>
>     These are the offending lines ...
>
>     static int
>     strcpy_s(char *dest, size_t n, const char *src) {
>         strcpy(dest, src);
>         return(0);
>     }
>
>     static int
>     wcscpy_s(wchar_t *dest, size_t n, const wchar_t *src) {
>         wcscpy(dest, src);
>         return(0);
>
>     These 2 xxx_s functions are new. Not sure when they were
>     introduced or in which lib file they reside.
>
>     Ed
>
>
>     On Thu, Jun 16, 2011 at 12:21 PM, Aleksey Sanin
>     <aleksey at aleksey.com <mailto:aleksey at aleksey.com>> wrote:
>
>         Ed,
>
>         I believe VC7.1 (VS 2003) is the minimum supported version.
>
>         Aleksey
>
>
>         On 6/16/11 8:04 AM, EdShallow wrote:
>>         I think my MSSDK is too old? Possible?
>>
>>         All the MS .lib files are  but there may be a new reference
>>         that wasn't there before. I am using VC6.
>>
>>         Ed
>>
>>         On Thu, Jun 16, 2011 at 10:36 AM, EdShallow
>>         <ed.shallow at gmail.com <mailto:ed.shallow at gmail.com>> wrote:
>>
>>             Hi Aleksey,
>>
>>                Experiencing a link error related to mscrypto when
>>             compiling 1.18 Here is the reported link error at the
>>             bottom of the nmake output.
>>
>>                I am using the same environment as I last did with my
>>             last 1.11 compile
>>
>>                Any ideas which .lib or .dll are missing?
>>
>>             Thanks,
>>             Ed
>>
>>             C:\XMLSec\xmlsec1-1.2.18\
>>             win32>nmake
>>
>>             Microsoft (R) Program Maintenance Utility   Version 7.00.8882
>>             Copyright (C) Microsoft Corp 1988-2000. All rights reserved.
>>
>>                     cl.exe /nologo /D "WIN32" /D "_WINDOWS" /D
>>             "_MBCS" /D "_REENTRANT"  /W1 /MD /I.. /I..\include
>>             /IC:\XMLSec\xmlsec1-1.2.18\include /D PACKAGE=\"xmlsec\"
>>             /D "HAVE_STDIO_H" /D "HAVE
>>             _STDLIB_H" /D "HAVE_STRING_H" /D "HAVE_CTYPE_H" /D
>>             "HAVE_MALLOC_H" /D "HAVE_MEMORY_H" /D "NDEBUG" /O2
>>             /DXMLSEC_MSCRYPTO_NT4=1 /D "XMLSEC_DL_WIN32"
>>             /Folibxmlsec.int\ /c ..\src\app.c ..\s
>>             rc\base64.c ..\src\bn.c ..\src\buffer.c ..\src\c14n.c
>>             ..\src\dl.c ..\src\enveloped.c ..\src\errors.c
>>             ..\src\io.c ..\src\keyinfo.c ..\src\keys.c
>>             ..\src\keysdata.c ..\src\keysmngr.c ..\sr
>>             c\kw_aes_des.c ..\src\list.c ..\src\membuf.c
>>             ..\src\nodeset.c ..\src\parser.c ..\src\soap.c
>>             ..\src\strings.c ..\src\templates.c ..\src\transforms.c
>>             ..\src\x509.c ..\src\xkms.c ..\src\xm
>>             ldsig.c ..\src\xmlenc.c ..\src\xmlsec.c ..\src\xmltree.c
>>             ..\src\xpath.c ..\src\xslt.c
>>             app.c
>>             base64.c
>>             bn.c
>>             buffer.c
>>             c14n.c
>>             dl.c
>>             enveloped.c
>>             errors.c
>>             io.c
>>             keyinfo.c
>>             keys.c
>>             keysdata.c
>>             keysmngr.c
>>             kw_aes_des.c
>>             list.c
>>             membuf.c
>>             nodeset.c
>>             parser.c
>>             soap.c
>>             strings.c
>>             Generating Code...
>>             Compiling...
>>             templates.c
>>             transforms.c
>>             x509.c
>>             xkms.c
>>             xmldsig.c
>>             xmlenc.c
>>             xmlsec.c
>>             xmltree.c
>>             xpath.c
>>             xslt.c
>>             Generating Code...
>>                     link.exe /nologo /LIBPATH:binaries
>>             /LIBPATH:C:\XMLSec\xmlsec1-1.2.18\lib /OPT:NOWIN98 /DLL
>>             /VERSION:1.2  /IMPLIB:binaries\libxmlsec.lib
>>             /OUT:binaries\libxmlsec.dll libxmlsec.in
>>             <http://libxmlsec.in/>
>>             t\app.obj libxmlsec.int
>>             <http://libxmlsec.int/>\base64.obj libxmlsec.int
>>             <http://libxmlsec.int/>\bn.obj libxmlsec.int
>>             <http://libxmlsec.int/>\buffer.obj libxmlsec.int
>>             <http://libxmlsec.int/>\c14n.obj libxmlsec.int
>>             <http://libxmlsec.int/>\dl.obj libxmlsec.int
>>             <http://libxmlsec.int/>\enveloped.obj libxmlsec.int
>>             <http://libxmlsec.int/>\errors.obj  li
>>             bxmlsec.int <http://bxmlsec.int/>\io.obj libxmlsec.int
>>             <http://libxmlsec.int/>\keyinfo.obj libxmlsec.int
>>             <http://libxmlsec.int/>\keys.obj libxmlsec.int
>>             <http://libxmlsec.int/>\keysdata.obj libxmlsec.int
>>             <http://libxmlsec.int/>\keysmngr.obj libxmlsec.int
>>             <http://libxmlsec.int/>\kw_aes_des.obj libxmlsec.int
>>             <http://libxmlsec.int/>\list.obj  libx
>>             mlsec.int <http://mlsec.int/>\membuf.obj libxmlsec.int
>>             <http://libxmlsec.int/>\nodeset.obj libxmlsec.int
>>             <http://libxmlsec.int/>\parser.obj libxmlsec.int
>>             <http://libxmlsec.int/>\soap.obj libxmlsec.int
>>             <http://libxmlsec.int/>\strings.obj libxmlsec.int
>>             <http://libxmlsec.int/>\templates.obj libxmlsec.int
>>             <http://libxmlsec.int/>\transforms.obj
>>             libxmlsec.int <http://libxmlsec.int/>\x509.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xkms.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xmldsig.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xmlenc.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xmlsec.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xmltree.obj
>>             libxmlsec.int <http://libxmlsec.int/>\xpath.obj  libxml
>>             sec.int <http://sec.int/>\xslt.obj  libxml2.lib libxslt.lib
>>                Creating library binaries\libxmlsec.lib and object
>>             binaries\libxmlsec.exp
>>                     if not exist libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/> mkdir
>>             libxmlsec_mscrypto.int <http://libxmlsec_mscrypto.int/>
>>                     cl.exe /nologo /D "WIN32" /D "_WINDOWS" /D
>>             "_MBCS" /D "_REENTRANT"  /W1 /MD /I.. /I..\include
>>             /IC:\XMLSec\xmlsec1-1.2.18\include /D PACKAGE=\"xmlsec\"
>>             /D "HAVE_STDIO_H" /D "HAVE
>>             _STDLIB_H" /D "HAVE_STRING_H" /D "HAVE_CTYPE_H" /D
>>             "HAVE_MALLOC_H" /D "HAVE_MEMORY_H" /D "NDEBUG" /O2
>>             /DXMLSEC_MSCRYPTO_NT4=1 /D "XMLSEC_DL_WIN32" /D
>>             "XMLSEC_CRYPTO_MSCRYPTO" /D "XMLSEC
>>             _CRYPTO=\"mscrypto\"" /Folibxmlsec_mscrypto.int\ /c
>>             ..\src\mscrypto\app.c ..\src\mscrypto\crypto.c
>>             ..\src\mscrypto\ciphers.c ..\src\mscrypto\digests.c
>>             ..\src\mscrypto\hmac.c ..\src\mscr
>>             ypto\symkeys.c ..\src\mscrypto\kt_rsa.c
>>             ..\src\mscrypto\kw_aes.c ..\src\mscrypto\kw_des.c
>>             ..\src\mscrypto\signatures.c ..\src\mscrypto\certkeys.c
>>             ..\src\mscrypto\keysstore.c ..\src\mscr
>>             ypto\x509.c ..\src\mscrypto\x509vfy.c
>>             app.c
>>             crypto.c
>>             ciphers.c
>>             digests.c
>>             hmac.c
>>             symkeys.c
>>             kt_rsa.c
>>             kw_aes.c
>>             kw_des.c
>>             signatures.c
>>             certkeys.c
>>             keysstore.c
>>             x509.c
>>             x509vfy.c
>>             Generating Code...
>>                     cl.exe /nologo /D "WIN32" /D "_WINDOWS" /D
>>             "_MBCS" /D "_REENTRANT"  /W1 /MD /I.. /I..\include
>>             /IC:\XMLSec\xmlsec1-1.2.18\include /D PACKAGE=\"xmlsec\"
>>             /D "HAVE_STDIO_H" /D "HAVE
>>             _STDLIB_H" /D "HAVE_STRING_H" /D "HAVE_CTYPE_H" /D
>>             "HAVE_MALLOC_H" /D "HAVE_MEMORY_H" /D "NDEBUG" /O2
>>             /DXMLSEC_MSCRYPTO_NT4=1 /D "XMLSEC_DL_WIN32" /D
>>             "XMLSEC_CRYPTO_MSCRYPTO" /D "XMLSEC
>>             _CRYPTO=\"mscrypto\"" /Folibxmlsec_mscrypto.int\ /c
>>             ..\src\strings.c
>>             strings.c
>>                     link.exe /nologo /LIBPATH:binaries
>>             /LIBPATH:C:\XMLSec\xmlsec1-1.2.18\lib /OPT:NOWIN98 /DLL
>>             /VERSION:1.2  /IMPLIB:binaries\libxmlsec-mscrypto.lib
>>             /OUT:binaries\libxmlsec-mscrypto
>>             .dll libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\app.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\crypto.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\ciphers.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\digests.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\hmac.obj  libxmlse
>>             c_mscrypto.int <http://c_mscrypto.int/>\symkeys.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\kt_rsa.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\kw_aes.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\kw_des.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\strings.obj 
>>             libxmlsec_mscryp
>>             to.int <http://to.int/>\signatures.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\certkeys.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\keysstore.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\x509.obj
>>             libxmlsec_mscrypto.int
>>             <http://libxmlsec_mscrypto.int/>\x509vfy.obj
>>             libxmlsec.lib  libx
>>             ml2.lib libxslt.lib kernel32.lib user32.lib gdi32.lib
>>             Crypt32.lib Advapi32.lib
>>                Creating library binaries\libxmlsec-mscrypto.lib and
>>             object binaries\libxmlsec-mscrypto.exp
>>             crypto.obj : error LNK2019: unresolved external symbol
>>             _wcscpy_s referenced in function
>>             _xmlSecMSCryptoErrorsDefaultCallback
>>             crypto.obj : error LNK2019: unresolved external symbol
>>             _strcpy_s referenced in function
>>             _xmlSecMSCryptoErrorsDefaultCallback
>>             binaries\libxmlsec-mscrypto.dll : fatal error LNK1120: 2
>>             unresolved externals
>>             NMAKE : fatal error U1077: 'link.exe' : return code '0x460'
>>             Stop.
>>
>>             C:\XMLSec\xmlsec1-1.2.18\win32>
>>
>>
>>
>>
>>
>>         -- 
>>         Ed's Contact Information:
>>         Mobile Phone: 613-852-6410 <tel:613-852-6410>
>>         Gmail: ed.shallow at gmail.com <mailto:ed.shallow at gmail.com>
>>         VOIP Address: 107529 at sip.ca1.voip.ms
>>         <mailto:107529 at sip.ca1.voip.ms>
>>         VOIP DID#: 613-458-5004 <tel:613-458-5004>
>>         Skype ID: edward.shallow
>>         Home Phone: 613-482-2090 <tel:613-482-2090>
>>
>>
>>         _______________________________________________
>>         xmlsec mailing list
>>         xmlsec at aleksey.com  <mailto:xmlsec at aleksey.com>
>>         http://www.aleksey.com/mailman/listinfo/xmlsec
>
>
>
>
>     -- 
>     Ed's Contact Information:
>     Mobile Phone: 613-852-6410 <tel:613-852-6410>
>     Gmail: ed.shallow at gmail.com <mailto:ed.shallow at gmail.com>
>     VOIP Address: 107529 at sip.ca1.voip.ms <mailto:107529 at sip.ca1.voip.ms>
>     VOIP DID#: 613-458-5004 <tel:613-458-5004>
>     Skype ID: edward.shallow
>     Home Phone: 613-482-2090 <tel:613-482-2090>
>
>
>
>
> -- 
> Ed's Contact Information:
> Mobile Phone: 613-852-6410
> Gmail: ed.shallow at gmail.com <mailto:ed.shallow at gmail.com>
> VOIP Address: 107529 at sip.ca1.voip.ms <mailto:107529 at sip.ca1.voip.ms>
> VOIP DID#: 613-458-5004
> Skype ID: edward.shallow
> Home Phone: 613-482-2090
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.aleksey.com/pipermail/xmlsec/attachments/20110616/5f5027e3/attachment-0001.html>


More information about the xmlsec mailing list