[Expat-discuss] using expat as a static library

Fred L. Drake, Jr. fdrake@acm.org
Fri Jun 28 12:21:13 2002


Tentacula writes:
 > I've just a problem : I'd like to use expat as a static library
 > using VC6 (sp5), is it possible ? and if yes how can I do so ?

You *should* be able to simply copy the .c and .h files from the lib/
directory of the sources, add the .c files to your project, and build
normally.  But I've not tried to do that myself under Windows, but
this is common on Unix.

 > when I try to compil expat I get these linker errors :
 > 
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_GetCurrentLineNumber
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_ParserFree
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_ErrorString
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_GetErrorCode
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_Parse
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_SetCharacterDataHandler
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_SetElementHandler
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_SetUserData
 > xml.obj : error LNK2001: unresolved external symbol __imp__XML_ParserCreate

I don't know what's up with this.  Hopefully someone who knows more
about doing this in the Windows environment can be of more help.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation