Hi!
At first, I'm from Germany. Please be gentle
if my English is not as good as yours. ;)
This is the situation I'm in right now:
Building the Xerces (-all) project for my
Visual Studio .NET 2003 IDE (7.1) was successful.
In Extras -> Options -> Projects I set the VC++ folders for:
- executables (the Debug folder - where the DLL is)
- includes (the xerces-c-src_2_7_0\src folder)
- references or links (AGAIN the Debug folder - where the LIB is)
- libraries (AGAIN the Debug folder - where the LIB is)
- sources (AGAIN the xerces-c-src_2_7_0\src folder)
I hope that these folder setting are correct.
The Xerces build instructions don't mention
all of these settings and where they can be found in VS. :(
Then I went on and wrote some code but got
some Xerces-related errors during compiling my stuff.
I remembered that there were some example
projects, so I tried to compile one that's called SAX2Count.
And here's the most recent (German) error listing:
BEGIN LISTING.
------ Neues Erstellen gestartet: Projekt:
SAX2Count, Konfiguration: Debug Win32 ------
Die Zwischen- und Ausgabedateien für das
Projekt "SAX2Count" mit der Konfiguration "Debug|Win32" werden gelöscht.
Kompilieren...
SAX2CountHandlers.cpp
r:\Xerces-Source\xerces-c-src_2_7_0\src\xercesc\internal\XSerializeEngine.hpp(818)
: warning C4244: 'return': Konvertierung von
'__w64 int' in 'unsigned long', möglicher Datenverlust
r:\Xerces-Source\xerces-c-src_2_7_0\src\xercesc\internal\XMLScanner.hpp(1292)
: warning C4267: 'Argument': Konvertierung von
'size_t' nach 'const unsigned int', Datenverlust möglich
SAX2Count.cpp
r:\Xerces-Source\xerces-c-src_2_7_0\src\xercesc\internal\XSerializeEngine.hpp(818)
: warning C4244: 'return': Konvertierung von
'__w64 int' in 'unsigned long', möglicher Datenverlust
r:\Xerces-Source\xerces-c-src_2_7_0\src\xercesc\internal\XMLScanner.hpp(1292)
: warning C4267: 'Argument': Konvertierung von
'size_t' nach 'const unsigned int', Datenverlust möglich
Code wird generiert...
Verknüpfen...
SAX2Count.obj : error LNK2019: Nicht
aufgelöstes externes Symbol '"__declspec(dllimport) public: static void __cdecl
xercesc_2_7::XMLPlatformUtils::Terminate(void)"
([EMAIL PROTECTED]@xercesc_2_7@@SAXXZ)', verwiesen in Funktion
'__catch$_main$0'
SAX2Count.obj : error LNK2019: Nicht
aufgelöstes externes Symbol
'"__declspec(dllimport) public: static unsigned long __cdecl
xercesc_2_7::XMLPlatformUtils::getCurrentMillis(void)"
([EMAIL PROTECTED]@xercesc_2_7@@SAKXZ)', verwiesen in
Funktion '__catch$_main$0'
SAX2Count.obj : error LNK2001:
Nichtaufgelöstes externes Symbol
"__declspec(dllimport) public: static unsigned short const * const
xercesc_2_7::XMLUni::fgXercesDynamic"
([EMAIL PROTECTED]@xercesc_2_7@@2QBGB)
SAX2Count.obj : error LNK2001:
Nichtaufgelöstes externes Symbol
"__declspec(dllimport) public: static unsigned short const * const
xercesc_2_7::XMLUni::fgSAX2CoreValidation"
([EMAIL PROTECTED]@xercesc_2_7@@2QBGB)
[...]
SAX2CountHandlers.obj : error LNK2001:
Nichtaufgelöstes externes Symbol
"__declspec(dllimport) public: static void __cdecl
xercesc_2_7::XMLString::release(char * *)"
([EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED])
SAX2CountHandlers.obj : error LNK2001:
Nichtaufgelöstes externes Symbol "public: virtual void __thiscall
xercesc_2_7::DefaultHandler::externalEntityDecl(unsigned
short const * const,unsigned short const * const,unsigned short const *
const)" ([EMAIL PROTECTED]@xercesc_2_7@@[EMAIL PROTECTED])
[...]
SAX2CountHandlers.obj : error LNK2019: Nicht
aufgelöstes externes Symbol '"__declspec(dllimport) public: __thiscall
xercesc_2_7::DefaultHandler::DefaultHandler(void)"
([EMAIL PROTECTED]@@[EMAIL PROTECTED])', verwiesen in Funktion '"public:
__thiscall
SAX2CountHandlers::SAX2CountHandlers(void)" (??0SAX2CountHandlers@@[EMAIL PROTECTED])'
SAX2CountHandlers.obj : error LNK2019: Nicht
aufgelöstes externes Symbol '"__declspec(dllimport) public: virtual __thiscall
xercesc_2_7::DefaultHandler::~DefaultHandler(void)"
([EMAIL PROTECTED]@@[EMAIL PROTECTED])', verwiesen in Funktion '"public:
virtual __thiscall
SAX2CountHandlers::~SAX2CountHandlers(void)" (??1SAX2CountHandlers@@[EMAIL PROTECTED])'
[...]
Debug/SAX2Count.exe : fatal error LNK1120: 45 unaufgelöste externe Verweise
Das Build-Protokoll wurde unter
"file://d:\matty79m\Programmdaten\VisualStudio\SAX2Count\Debug\BuildLog.htm"
gespeichert.
SAX2Count - 48 Fehler, 4 Warnung(en)
---------------------- Fertig ----------------------
Neues Erstellen: 0 erfolgreich, 1 fehlgeschlagen, 0 übersprungen
END LISTING.
I read a lot of threads but none seems to fit to my problem.
There is a thread with a quite similar error
listing and the reason was that headers were
compiled as a consequence of a wrong value
in the registry. Unfortunately, that's not the
solution to my problem. At least that's what my registry settings say...
To me, it looks as if there's something with "unsigned short const * const".
What shall I do to avoid these errors and warnings?
Please answer as detailed as you can because
I'm new to C++, Visual Studio, and Xerces.
Thank you.
:) Matty