[xsde-users] XSDe in a VC++ 2008 project

Boris Kolpackov boris at codesynthesis.com
Mon Jun 15 15:30:43 EDT 2009


Hi Fabrizio,

Fabrizio Santini <biziosan at comcast.net> writes:

> I need a very light XML parser and serializer for my MFC project, and  
> XSDe is just perfect! I am trying to compile a very simple example  
> (protocol) as a VC++ project 2008 with MFC. Although I know it is  
> possible to compile XSDe examples using nmake, I was unable to port the  
> makefile settings into the VC++ 2008 solution to run this example. The  
> compilation seems to go smoothly, but linking produces lots of  
> conflicts. Has anyone successfully compiled and run an MFC application  
> with XSDe?

I haven't tried XSD/e with an MFC application but it definitely should be
possible. Seeing that you are getting link errors I would first look for
these two things:

1. I assume you added libxsd.lib to be linked to your application in the
   linker settings.

2. You need to make sure that libxsd was built with the same runtime
   settings as you application. For that go to your project settings,
   C++ compiler tab, and check the command line. There you should 
   see one of the /M* options (e.g., /MT, /MTd, etc). Add the same
   option to the config/config.nmake file to the CFLAGS and CXXFLAGS
   variables. Then clean (name /f nmakefile clean) and build 
   (name /f nmakefile) libxsd. There could be other options on the
   command line that you may want to copy but normally only the /M*
   ones cause link failures.

If none of the above helps, feel free to send your test application
so that I can take a look.

Boris



More information about the xsde-users mailing list