Xerces tips
From Code Synthesis Wiki
Revision as of 14:43, 29 December 2008; view current revision
←Older revision | Newer revision→
←Older revision | Newer revision→
This page contains tips on using Xerces-C++ in various non-standard situations.
[edit]
Linking statically on Windows with VC++ 7.1 and 8
Xerces-C++ 2.7.0 comes with project files that can build static libraries. There are two things you will need to do in order to successfully link such static libraries to your application:
- Define the XML_LIBRARY preprocessor symbol while building your application (Project->Properties->C/C++/Preprocessor/Preprocessor_Definitions). If you do not do this then the Xerces-C++ headers will think you are linking against DLL (the default) and will add
__declspec (dllimport)
to all symbols. This will result in a lot of unresolved symbols during linking. - If you build Xerces-C++ with the network support (the default) then you will need to link to the
ws2_32.lib
library (Winsock2). You can add it into the Project->Properties->Linker->Input->Additional_Dependecies field.
[edit]