[xmlsec] winxp compiling/linking dll

Aleksey Sanin aleksey at aleksey.com
Wed May 31 17:00:27 PDT 2006

> I have taken the source code for the xmlsec.exe that
> comes with the xmlsec1-1.2.9 sourcecode download and
> modified it to be recompiled into a dll. 

Hm... Not sure what do you mean by this but...

> However, when attempting to do a build on my source
> files I get a long list of errors complaining about
> not being able to link correctly.  The error lines are
> some what like the one listed here:
> crypto.obj : error LNK2019: unresolved external symbol
> __imp__xmlSecMSCryptoInit at 0 referenced in function
> _xmlSecAppCryptoInit at 4
> xmlsecfunctions.obj : error LNK2019: unresolved
> external symbol __imp__xmlSecDSigCtxDebugXmlDump at 8
> referenced in function _xmlSecAppPrintDSigCtx at 4
Looks like you forgot to link with xmlsec-mscrypto library.
The xmlsec.exe application can either load it dynamically
or link against it statically. Probably some "defines" are
missing from your makefile.

> Trying to get the libs to link correctly seems to be
> the problem. I wonder if anybody can point me in the
> correct direction on how to make sure that my setup is
> done correctly?  I am able to compile but why doesn't
> the linking work correctly?  Any Ideas?  Am I doing
> anything wrong in my sources file?
Well, best advice I have is to use the makefiles included
in the xmlsec distribution. Otherwise, you are on your own
and your mileage may vary....

> I have been able to create a MSVC++6.0 dll project and
> get it to compile and link properly,but as mentioned
> in other posts in this mailing list, problems arises
> when trying to access it with the first I/O.  The dll
> crashes with first I/O attempt.  So, that is why I am
> attempting to recreate with the Win XP DDK C Compiler.

XMLSEC FAQ, section 3.2


More information about the xmlsec mailing list