[Expat-discuss] (no subject)

Joe Cosby joecosby_expat at hotmail.com
Thu Jan 3 22:36:02 CET 2008


I'm working on an application which will need to be able to read and parse XML files.

I'm trying, as much as possible, to keep everything in the executable.  I'd like the user to be able to just download the executable and run it and no more installation burden than that be necessary.

I've downloaded the expat 2.0.1 distro and it builds very easily (I'm using MS Visual C++ 6) and I've set up a small test program which calls expat and that's easy enough.

But I can't see a way to make it work without installing the DLL.

Is it possible to just link the expat code into my application, without using the DLL?

I talked to somebody on Usenet who said he linked with one of the libraries in the StaticLibs directory, but that this isn't provided in the 2.0.1 distro.  I do have a directory \expat-2.0.1\win32\tmp\Debug_static which contains these object files:

xmltok_ns.obj
xmltok_impl.obj
xmltok.obj
xmlrole.obj
xmlparse.obj

I have used object files that way in the past, if you have the headers you can just use them sort of the way you would use Java class files, but at compile time ... It's been a while since I've done it that way but it's possible in theory.

But I'm not sure if this is even possible the way expat is set up or what project/header files I would need to use.  My test project is just this so far:

#include 
#include "expat.h"

int main(int argc, char *argv[])
{
	printf("Starting ...\r\n");
	XML_Parser parser = XML_ParserCreate(NULL);


	XML_ParserFree(parser);
	
	return 0;
}

And that requires the DLL.

There's also a directory expat-2.0.1\win32\bin\Debug which contains libexpatMT.lib and libexpatW.lib, and I'm thinking I might be able to link with these but again I am not sure how to set the project up.


Anyway thanks for any help anybody can offer on this.  I suppose it's not the end of the world if I just have to include the DLL with the project but I am trying to avoid that if I can.

_________________________________________________________________
The best games are on Xbox 360.  Click here for a special offer on an Xbox 360 Console.
http://www.xbox.com/en-US/hardware/wheretobuy/


More information about the Expat-discuss mailing list