I think the script problems you are seeing are due to line endings. Check out the file from cvs by supplying "-kb" option to "co" cvs -d "whatever" co -kb logging-log4cxx
I got it to compile (and run a few preliminary tests -- I am still not
confident in the results) by applying the following diff to tchar.h (also
attached)
After building it, I created a .dll by using the following command:
g++ -shared -o log4cxx.dll -Wl,--out-implib=liblog4cxx.dll.a
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--whole-archive
liblog4cxx.a -Wl,--no-whole-archive '-L/usr/lib -lxml2 -lz -lpthread -liconv
-lm' -lxml2 -lz -lpthread -liconv -lm
Index: include/log4cxx/helpers/tchar.h
===================================================================
RCS file: /home/cvspublic/logging-log4cxx/include/log4cxx/helpers/tchar.h,v
retrieving revision 1.35
diff -c -r1.35 tchar.h
*** include/log4cxx/helpers/tchar.h 13 May 2004 21:14:38 -0000 1.35
--- include/log4cxx/helpers/tchar.h 21 May 2004 22:56:44 -0000
***************
*** 42,64 ****
return dst;
}
! static void int64ToString(wchar_t * dst, size_t maxlen, const
int64_t& ll)
{
#ifdef WIN32
! _snwprintf(dst, maxlen, L"%I64d", ll);
#else
! swprintf(dst, maxlen, L"%lld", ll);
#endif
}
!
! static void int64ToString(char * dst, size_t maxlen, const int64_t&
ll)
{
#ifdef WIN32
! _snprintf(dst, maxlen, "%I64d", ll);
#else
! snprintf(dst, maxlen, "%lld", ll);
#endif
}
};
namespace std
--- 42,74 ----
return dst;
}
! static void int64ToString(char * dst, size_t maxlen, const
int64_t& ll)
{
#ifdef WIN32
! _snprintf(dst, maxlen, "%I64d", ll);
#else
! snprintf(dst, maxlen, "%lld", ll);
#endif
}
!
! #ifdef __CYGWIN__
! static void int64ToString(wchar_t * dst, size_t maxlen, const
int64_t& ll)
! {
! char temp[32];
! int64ToString(temp, sizeof(temp), ll);
! ansiToUnicode(dst, temp);
! }
! #else
! static void int64ToString(wchar_t * dst, size_t maxlen, const
int64_t& ll)
{
#ifdef WIN32
! _snwprintf(dst, maxlen, L"%I64d", ll);
#else
! swprintf(dst, maxlen, L"%lld", ll);
#endif
}
+ #endif /* __CYGWIN__ */
+
};
namespace std
Jwahar Bammi
Memento, Inc.
[EMAIL PROTECTED]
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 6:23 PM
To: [email protected]
Subject: Compiling 0.9.7 under cygwin
Hi all,
I'm trying to compile 0.9.7 under Cygwin on Windows 2000. At first,
configure failed with a message with a message about not being able to find
an input file but which file wasn't named. I changed 4 lines like this:
echo "$as_me: error: cannot find input file: $f" >&2;} To this: echo
"$as_me:$LINENO: error: cannot find input file: $f" >&2;}
That seemed to get around that problem. Incidentally, I don't know why that
worked, I thought I was just adding some debug info.
After I got configure to work, compilation failed by complaining about line
48 of tchar.h. I thought at first the problem was that WIN32 was not
defined anywhere. I tried adding #define WIN32 1 to config.h and
config_auto.h but it didn't matter.
I see instructions on using some Microsoft IDEs to compile but not for
Cygwin. Can someone give me a hint? I'm not a C/C++ programmer, so go easy
on me!
Thanks
Here's the exact output of my compilation failures:
$ make
Making all in docs
make[1]: Entering directory `/cygdrive/c/temp/log4cxx-0.9.7/docs'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/cygdrive/c/temp/log4cxx-0.9.7/docs'
Making all in src
make[1]: Entering directory `/cygdrive/c/temp/log4cxx-0.9.7/src'
if /bin/bash ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I.
-I../include/ log4cxx -I../include -I/usr/include/libxml2 -D_REENTRANT -g
-O2 -MT appenderat tachableimpl.lo -MD -MP -MF
".deps/appenderattachableimpl.Tpo" \
-c -o appenderattachableimpl.lo `test -f 'appenderattachableimpl.cpp' ||
echo './'`appenderattachableimpl.cpp; \ then mv -f
".deps/appenderattachableimpl.Tpo" ".deps/appenderattachableimpl.Plo"
; \
else rm -f ".deps/appenderattachableimpl.Tpo"; exit 1; \
fi
g++ -DHAVE_CONFIG_H -I. -I. -I../include/log4cxx -I../include
-I/usr/include/li bxml2 -D_REENTRANT -g -O2 -MT appenderattachableimpl.lo
-MD -MP -MF .deps/append erattachableimpl.Tpo -c appenderattachableimpl.cpp
-DPIC -o .libs/appenderattac hableimpl.o In file included from
appenderattachableimpl.cpp:17:
../include/log4cxx/helpers/tchar.h: In static member function `static void
Convert::int64ToString(wchar_t*, unsigned int, const int64_t&)':
../include/log4cxx/helpers/tchar.h:48: error: `_snwprintf' undeclared (first
use this function)
../include/log4cxx/helpers/tchar.h:48: error: (Each undeclared identifier is
reported only once for each function it appears in.)
../include/log4cxx/helpers/tchar.h: In static member function `static void
Convert::int64ToString(char*, unsigned int, const int64_t&)':
../include/log4cxx/helpers/tchar.h:57: error: `_snprintf' undeclared (first
use
this function)
make[1]: *** [appenderattachableimpl.lo] Error 1
make[1]: Leaving directory `/cygdrive/c/temp/log4cxx-0.9.7/src'
make: *** [all-recursive] Error 1
John Gregg
Web Developer
Wells Fargo/Mortgage IT
Minneapolis, MN
diffs-log4cxx
Description: Binary data
