mcatan 2004/04/30 10:36:09
Modified: include/log4cxx config_msvc.h
include/log4cxx/helpers tchar.h
msvc/dll dll.vcproj
msvc/static static.cpp static.vcproj
Log:
Forced unresolved symbols for the log4cxx static library compiled with msvc
Revision Changes Path
1.2 +6 -0 logging-log4cxx/include/log4cxx/config_msvc.h
Index: config_msvc.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/config_msvc.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- config_msvc.h 24 Apr 2004 07:12:27 -0000 1.1
+++ config_msvc.h 30 Apr 2004 17:36:08 -0000 1.2
@@ -31,10 +31,16 @@
#pragma warning(disable : 4250 4251 4786 4290)
#endif
+#ifdef LOG4CXX_STATIC
+#define LOG4CXX_EXPORT
+// cf. file msvc/static/static.cpp
+#pragma comment(linker, "/include:?ForceSymbolReferences@@YAXXZ")
+#else // DLL
#ifdef LOG4CXX
#define LOG4CXX_EXPORT __declspec(dllexport)
#else
#define LOG4CXX_EXPORT __declspec(dllimport)
+#endif
#endif
#define _WIN32_WINNT 0x0400
1.32 +1 -1 logging-log4cxx/include/log4cxx/helpers/tchar.h
Index: tchar.h
===================================================================
RCS file: /home/cvs/logging-log4cxx/include/log4cxx/helpers/tchar.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- tchar.h 28 Apr 2004 21:34:20 -0000 1.31
+++ tchar.h 30 Apr 2004 17:36:08 -0000 1.32
@@ -54,7 +54,7 @@
static void int64ToString(char * dst, size_t maxlen, const int64_t& ll)
{
#ifdef WIN32
- snprintf(dst, maxlen, "%I64d", ll);
+ _snprintf(dst, maxlen, "%I64d", ll);
#else
snprintf(dst, maxlen, "%lld", ll);
#endif
1.7 +3 -0 logging-log4cxx/msvc/dll/dll.vcproj
Index: dll.vcproj
===================================================================
RCS file: /home/cvs/logging-log4cxx/msvc/dll/dll.vcproj,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- dll.vcproj 14 Apr 2004 21:57:01 -0000 1.6
+++ dll.vcproj 30 Apr 2004 17:36:09 -0000 1.7
@@ -945,6 +945,9 @@
</FileConfiguration>
</File>
<File
+
RelativePath="..\..\src\fallbackerrorhandler.cpp">
+ </File>
+ <File
RelativePath="..\..\src\fileappender.cpp">
<FileConfiguration
Name="Debug|Win32">
1.2 +82 -82 logging-log4cxx/msvc/static/static.cpp
Index: static.cpp
===================================================================
RCS file: /home/cvs/logging-log4cxx/msvc/static/static.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- static.cpp 29 Apr 2004 22:03:28 -0000 1.1
+++ static.cpp 30 Apr 2004 17:36:09 -0000 1.2
@@ -1,82 +1,82 @@
-#include <log4cxx/asyncappender.h>
-#include <log4cxx/consoleappender.h>
-#include <log4cxx/dailyrollingfileappender.h>
-#include <log4cxx/htmllayout.h>
-#include <log4cxx/level.h>
-#include <log4cxx/patternlayout.h>
-#include <log4cxx/propertyconfigurator.h>
-#include <log4cxx/rollingfileappender.h>
-#include <log4cxx/simplelayout.h>
-#include <log4cxx/ttcclayout.h>
-#include <log4cxx/db/odbcappender.h>
-#include <log4cxx/helpers/appenderattachableimpl.h>
-#include <log4cxx/helpers/onlyonceerrorhandler.h>
-#include <log4cxx/net/smtpappender.h>
-#include <log4cxx/net/smtpappender.h>
-#include <log4cxx/net/socketappender.h>
-#include <log4cxx/net/sockethubappender.h>
-#include <log4cxx/net/syslogappender.h>
-#include <log4cxx/net/telnetappender.h>
-#include <log4cxx/net/xmlsocketappender.h>
-#include <log4cxx/nt/nteventlogappender.h>
-#include <log4cxx/spi/loggingevent.h>
-#include <log4cxx/varia/denyallfilter.h>
-#include <log4cxx/varia/fallbackerrorhandler.h>
-#include <log4cxx/varia/levelmatchfilter.h>
-#include <log4cxx/varia/levelrangefilter.h>
-#include <log4cxx/varia/stringmatchfilter.h>
-#include <log4cxx/xml/domconfigurator.h>
-#include <log4cxx/xml/xmllayout.h>
-
-using namespace log4cxx;
-using namespace log4cxx::db;
-using namespace log4cxx::helpers;
-using namespace log4cxx::net;
-using namespace log4cxx::nt;
-using namespace log4cxx::spi;
-using namespace log4cxx::varia;
-using namespace log4cxx::xml;
-
-/** Special function used to force symbol references for dynamic classes when
-comiling a static library with msvc.
-
-<b>This function must not be called directly !</b>
-*/
-void ForceSymbolReferences()
-{
- AsyncAppender();
- ConsoleAppender();
- DailyRollingFileAppender();
- FileAppender();
- HTMLLayout();
- PatternLayout();
- PropertyConfigurator();
- RollingFileAppender();
- SimpleLayout();
- TTCCLayout();
-#ifdef HAVE_ODBC
- ODBCAppender();
-#endif
- AppenderAttachableImpl();
- OnlyOnceErrorHandler();
-#ifdef HAVE_SMTP
- SMTPAppender();
- DefaultEvaluator();
-#endif
- SocketAppender();
- SocketHubAppender();
- SyslogAppender();
- TelnetAppender();
- XMLSocketAppender();
- NTEventLogAppender();
- LoggingEvent();
- DenyAllFilter();
- FallbackErrorHandler();
- LevelMatchFilter();
- LevelRangeFilter();
- StringMatchFilter();
-#ifdef HAVE_XML
- DOMConfigurator();
-#endif
- XMLLayout();
-}
+#include <log4cxx/asyncappender.h>
+#include <log4cxx/consoleappender.h>
+#include <log4cxx/dailyrollingfileappender.h>
+#include <log4cxx/htmllayout.h>
+#include <log4cxx/level.h>
+#include <log4cxx/patternlayout.h>
+#include <log4cxx/propertyconfigurator.h>
+#include <log4cxx/rollingfileappender.h>
+#include <log4cxx/simplelayout.h>
+#include <log4cxx/ttcclayout.h>
+#include <log4cxx/db/odbcappender.h>
+#include <log4cxx/helpers/appenderattachableimpl.h>
+#include <log4cxx/helpers/onlyonceerrorhandler.h>
+#include <log4cxx/net/smtpappender.h>
+#include <log4cxx/net/smtpappender.h>
+#include <log4cxx/net/socketappender.h>
+#include <log4cxx/net/sockethubappender.h>
+#include <log4cxx/net/syslogappender.h>
+#include <log4cxx/net/telnetappender.h>
+#include <log4cxx/net/xmlsocketappender.h>
+#include <log4cxx/nt/nteventlogappender.h>
+#include <log4cxx/spi/loggingevent.h>
+#include <log4cxx/varia/denyallfilter.h>
+#include <log4cxx/varia/fallbackerrorhandler.h>
+#include <log4cxx/varia/levelmatchfilter.h>
+#include <log4cxx/varia/levelrangefilter.h>
+#include <log4cxx/varia/stringmatchfilter.h>
+#include <log4cxx/xml/domconfigurator.h>
+#include <log4cxx/xml/xmllayout.h>
+
+using namespace log4cxx;
+using namespace log4cxx::db;
+using namespace log4cxx::helpers;
+using namespace log4cxx::net;
+using namespace log4cxx::nt;
+using namespace log4cxx::spi;
+using namespace log4cxx::varia;
+using namespace log4cxx::xml;
+
+/** Special function used to force symbol references for dynamic classes when
+comiling a static library with msvc.
+
+<b>This function must not be called directly !</b>
+*/
+void ForceSymbolReferences()
+{
+ AsyncAppender();
+ ConsoleAppender();
+ DailyRollingFileAppender();
+ FileAppender();
+ HTMLLayout();
+ PatternLayout();
+ PropertyConfigurator();
+ RollingFileAppender();
+ SimpleLayout();
+ TTCCLayout();
+#ifdef HAVE_ODBC
+ ODBCAppender();
+#endif
+ AppenderAttachableImpl();
+ OnlyOnceErrorHandler();
+#ifdef HAVE_SMTP
+ SMTPAppender();
+ DefaultEvaluator();
+#endif
+ SocketAppender();
+ SocketHubAppender();
+ SyslogAppender();
+ TelnetAppender();
+ XMLSocketAppender();
+ NTEventLogAppender();
+ LoggingEvent();
+ DenyAllFilter();
+ FallbackErrorHandler();
+ LevelMatchFilter();
+ LevelRangeFilter();
+ StringMatchFilter();
+#ifdef HAVE_XML
+ DOMConfigurator();
+#endif
+ XMLLayout();
+}
1.6 +12 -0 logging-log4cxx/msvc/static/static.vcproj
Index: static.vcproj
===================================================================
RCS file: /home/cvs/logging-log4cxx/msvc/static/static.vcproj,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- static.vcproj 5 Apr 2004 20:55:51 -0000 1.5
+++ static.vcproj 30 Apr 2004 17:36:09 -0000 1.6
@@ -828,6 +828,9 @@
RelativePath="..\..\src\event.cpp">
</File>
<File
+
RelativePath="..\..\src\fallbackerrorhandler.cpp">
+ </File>
+ <File
RelativePath="..\..\src\fileappender.cpp">
<FileConfiguration
Name="Unicode Release|Win32">
@@ -2394,6 +2397,9 @@
</FileConfiguration>
</File>
<File
+ RelativePath=".\static.cpp">
+ </File>
+ <File
RelativePath="..\..\src\stringhelper.cpp">
</File>
<File
@@ -2900,6 +2906,9 @@
RelativePath="..\..\include\log4cxx\config.h">
</File>
<File
+
RelativePath="..\..\include\log4cxx\config_msvc.h">
+ </File>
+ <File
RelativePath="..\..\include\log4cxx\consoleappender.h">
</File>
<File
@@ -3201,6 +3210,9 @@
Filter="h">
<File
RelativePath="..\..\include\log4cxx\varia\denyallfilter.h">
+ </File>
+ <File
+
RelativePath="..\..\include\log4cxx\varia\fallbackerrorhandler.h">
</File>
<File
RelativePath="..\..\include\log4cxx\varia\levelmatchfilter.h">