xerces-c-users mailing list archives

Hello,
I am currently using VC8 to compile xerces, I have added a project called
Tasks to the solution with a single file containing main() called
analysefile.cpp.
It is my intention to mess around with xerces in this file.
I'm following the programming guide, and have got stuck at the first stage.
Please take a look at the following screenshot which outlines my setup:
http://www.solong.co.uk/bugs/unresolved.jpg
After having copied and pasted code from the first window of
http://xerces.apache.org/xerces-c/program.html
I can't get my Tasks project to compile due to the following errors.
Since
Error 2 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_2_8::XMLPlatformUtils::Terminate(void)"
(__imp_?Terminate@XMLPlatformUtils@xercesc_2_8@@SAXXZ) referenced in
function __catch$_main$0 analysefile.obj Tasks
Error 3 error LNK2019: unresolved external symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_2_8::XMLPlatformUtils::Initialize(char const * const,char const *
const,class xercesc_2_8::PanicHandler * const,class
xercesc_2_8::MemoryManager * const,bool)"
(__imp_?Initialize@XMLPlatformUtils@xercesc_2_8@@SAXQBD0QAVPanicHandler@2
@QAVMemoryManager@2@_N@Z) referenced in function _main analysefile.obj
Tasks
Error 4 error LNK2001: unresolved external symbol
"__declspec(dllimport) public: static char const * const
xercesc_2_8::XMLUni::fgXercescDefaultLocale"
(__imp_?fgXercescDefaultLocale@XMLUni@xercesc_2_8@@2QBDB)
analysefile.obj Tasks
Error 5 fatal error LNK1120: 3 unresolved externals
D:\workspaces\test\xerces-c-src_2_8_0\Projects\Win32\VC8\xerces-all\Debug\Tasks.exe
Tasks
Surely it should still compile at this stage? I'm at a loss as to how to
resolve this. Any help much appreciated.
It should be noted however that the following code will compile:
#include <xercesc/util/PlatformUtils.hpp>
// Other include files, declarations, and non-Xerces-C++ initializations.
XERCES_CPP_NAMESPACE_USE
int main(int argc, char* argv[])
{
/* ALL THIS CODE COMMENTED OUT
try {
XMLPlatformUtils::Initialize();
}
catch (const XMLException& toCatch) {
// Do your failure processing here
return 1;
}
// Do your actual work with Xerces-C++ here.
XMLPlatformUtils::Terminate();
AND STOP HERE
*/
// Other terminations and cleanup.
return 0;
}
clearly it's something to do with the mention of XMLPlatformUtils::
Kind Regards
Dan