[Expat-discuss] Trouble using static expat in MS VC 6

Karl Waclawek karl@waclawek.net
Thu Nov 21 20:20:52 2002


Check the "elements" example project in the Expat workspace.
It has a dependency on expat_static. Check the Link page
in the project settings. Does the Additional Library Path
field show something like ..\lib\Release_static ?

Make sure that the libexpat.lib the linker finds is the right one.
If in doubt, rename all instances of libexpat.lib except for
the right one, and see what the linker reports.

Karl

----- Original Message ----- 
From: "Oriol" <omagrane@anthill.es>
To: <expat-discuss@libexpat.org>
Sent: Thursday, November 21, 2002 3:09 PM
Subject: Re: [Expat-discuss] Trouble using static expat in MS VC 6


>     Hi, Karl! Thank you for your quick reply!
>     After building expat-1.95.5 I obtained four different subdirectories
> with libraries in: Debug, Debug_static, Release and Release_static. So I
> added "libexpat.lib" to Project->Settings->Link->Library modules, and the
> path to this library in Tools->Options->Directories->Libraries.
>     So I think I am linking the static library, not the dll.
>     Is it right?
>     What else could be that external reference error due?
> 
>     Thank you very much again.
> 
>     Oriol
> 
> 
> 
> ----- Original Message -----
> From: "Karl Waclawek" <karl@waclawek.net>
> To: "Oriol" <omagrane@anthill.es>; <expat-discuss@libexpat.org>
> Sent: Thursday, November 21, 2002 7:58 PM
> Subject: Re: [Expat-discuss] Trouble using static expat in MS VC 6
> 
> 
> > You may have linked to the Dll import library instead of the static
> library.
> > They have the same names, but should be in different Release directories.
> >
> > The upcoming version of Expat will have a different naming scheme,
> > with the name post-fixed according to the version of the runtime
> > library used (multi-threaded or not, etc.). By default it will
> > build as libexpatMT.lib.
> >
> > Karl
> >
> > ----- Original Message -----
> > From: "Oriol" <omagrane@anthill.es>
> > To: <expat-discuss@libexpat.org>
> > Sent: Thursday, November 21, 2002 1:40 PM
> > Subject: [Expat-discuss] Trouble using static expat in MS VC 6
> >
> >
> >
> >     Hi,
> >     I've installed and successfully built expat 1.95.5 under Visual C 6.
> >     However, problems arise when I try to use it.
> >     I need to statically link the expat library to my program, but after a
> successful compilation,
> > the linker stops with this error: MyProgram.obj : "error LNK2001:
> unresolved external symbol
> > __imp__XML_ParserCreate"
> >     The library paths already include the directory where libexpat.lib
> lives, so the problem is not
> > a missing library.
> >     Furthermore I've declared the symbol XML_STATIC in
> Resources->Preprocessor, but the problem
> > still remains.
> >     Any idea?
> >
> >
> >
> 
> 
> 
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss@libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss
> 



More information about the Expat-discuss mailing list