Guten Tag Thorsten Schöning, am Montag, 31. Mai 2010 um 16:15 schrieben Sie:
> [Linker Fehler] Unresolved external 'std::basic_string<char, > std::char_traits<char>, std::allocator<char> >::basic_string<char, > std::char_traits<char>, std::allocator<char> >(int, int, const > std::allocator<char>&)' referenced from > D:\BENUTZER\TSCHOENING\EIGENE > DATEIEN\BIBLIOTHEKEN\TRUNK\C++\LOG4CXX\SRC\MAIN\CPP\PROJECT1.LIB|cacheddateformat In case anyone else is bound to an old Borland, like us: The problem occurs where variables of type LogString are constructed with numeric characters. Borland doesn't interpret the provided hex codes to be a wchar_t, like Visual Studio seems to do. There are only a few statements that were responsible for our error and after changing them to use the macro and LOG4CXX_STR everything seems to work now. I don't understand why hex codes are used anyway, because some places have the character meaning commented right after. Our changes: Index: D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/syslogappender.cpp =================================================================== --- D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/syslogappender.cpp (Revision 1277) +++ D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/syslogappender.cpp (Revision 1278) @@ -285,7 +285,7 @@ return; } - LogString sbuf(1, 0x3C /* '<' */); + LogString sbuf(1, LOG4CXX_STR('<')); StringHelper::toString((syslogFacility | event->getLevel()->getSyslogEquivalent()), p, sbuf); sbuf.append(1, (logchar) 0x3E /* '>' */); if (facilityPrinting) Index: D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/telnetappender.cpp =================================================================== --- D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/telnetappender.cpp (Revision 1277) +++ D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/telnetappender.cpp (Revision 1278) @@ -178,7 +178,7 @@ write(buf); buf.clear(); if (CharsetEncoder::isError(stat)) { - LogString unrepresented(1, 0x3F /* '?' */); + LogString unrepresented(1, LOG4CXX_STR('?')); LogString::const_iterator unrepresentedIter(unrepresented.begin()); stat = encoder->encode(unrepresented, unrepresentedIter, buf); buf.flip(); Index: D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/cacheddateformat.cpp =================================================================== --- D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/cacheddateformat.cpp (Revision 1277) +++ D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/cpp/cacheddateformat.cpp (Revision 1278) @@ -42,7 +42,7 @@ /** * Expected representation of first magic number. */ -const logchar CachedDateFormat::magicString1[] = { 0x36, 0x35, 0x34, 0 }; +const LogString CachedDateFormat::magicString1 = LOG4CXX_STR("654"); /** @@ -71,7 +71,7 @@ formatter(dateFormat), millisecondStart(0), slotBegin(std::numeric_limits<log4cxx_time_t>::min()), - cache(50, 0x20), + cache(50, LOG4CXX_STR(' ')), expiration(expiration1), previousTime(std::numeric_limits<log4cxx_time_t>::min()) { if (dateFormat == NULL) { Index: D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/include/log4cxx/helpers/cacheddateformat.h =================================================================== --- D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/include/log4cxx/helpers/cacheddateformat.h (Revision 1277) +++ D:/Benutzer/tschoening/Eigene Dateien/Bibliotheken/trunk/C++/log4cxx/src/main/include/log4cxx/helpers/cacheddateformat.h (Revision 1278) @@ -62,7 +62,7 @@ /** * Expected representation of first magic number. */ - static const logchar magicString1[]; + static const LogString magicString1; /** Mit freundlichen Grüßen, Thorsten Schöning -- Thorsten Schöning AM-SoFT IT-Systeme - Hameln | Potsdam | Leipzig Telefon: Potsdam: 0331-743881-0 E-Mail: tschoen...@am-soft.de Web: http://www.am-soft.de AM-SoFT GmbH IT-Systeme, Konsumhof 1-5, 14482 Potsdam Amtsgericht Potsdam HRB 21278 P, Geschäftsführer: Andreas Muchow