On Dec 29, 2006, at 6:10 PM, Bob Rossi wrote:

On Mon, Dec 25, 2006 at 11:08:09PM -0500, Bob Rossi wrote:
On Fri, Dec 15, 2006 at 09:33:12AM -0500, Bob Rossi wrote:
Hi,

Here is a patch to get log4cxx to compile with mingw, using g+ +-4.1. Can
someone please apply this for me?

This is a very simple patch. Can someone please review it?

I recently switched from log4cpp to log4cxx because I thought log4cpp
was sort of a dead project. Anyone activily working on this project?
Anyone responsible for patch review?

Thanks in advance!
Bob Rossi


I committed a slightly different change in rev 491169. I had spent several hours today trying to get a working MinGW build going and passing the unit tests so I wasn't applying a change in the dark. I did find a solution for LOGCXX-166, but it seems that that problem must not occur with the 4.1 gcc you are using versus the 3.4.2 I'm using.

I have run into several problems in APR on MinGW that I'm surprised that you have not run into. Again maybe it is due to the difference in MinGW environments that we are using or changes between APR-1.2.7 and whatever source drop you are using.

I had to remove a duplicate declaration of apr_wchar_t in include/ arch/win32/apr_arch_file_io.h, add an include of "dce.h" to misc/ win32/rand.c and tweak apr.hw. I'll try to get those clean and submit them as bug reports to APR.

Even after that I'm still getting unresolved references when trying to link either log4cxx.dll or the APR unit tests. I can successfully link tiny hello world programs that call the functions, so I know the symbols are in the correct libraries, but I'm at a loss why they not found when it counts.


[cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0x467): In function `resolve_prot': [cc] C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/win32/filestat.c: 114: undefined reference to `GetEffectiveRightsFromAclW' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0x4e1):C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/ win32/filestat.c:127: undefined reference to `GetEffectiveRightsFromAclW' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0x553):C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/ win32/filestat.c:135: undefined reference to `GetEffectiveRightsFromAclW' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0x966): In function `more_finfo': [cc] C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/win32/filestat.c: 243: undefined reference to `GetNamedSecurityInfoW' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0xa1e):C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/ win32/filestat.c:253: undefined reference to `GetNamedSecurityInfoA' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a (filestat.o)(.text+0xac1):C:/ls-svn/log4cxx/lib/apr-1.2.7/file_io/ win32/filestat.c:260: undefined reference to `GetSecurityInfo' [cc] C:\ls-svn\log4cxx\build\debug\static/libapr-1d.a(start.o) (.text+0x318): In function `apr_app_initialize': [cc] C:/ls-svn/log4cxx/lib/apr-1.2.7/misc/win32/start.c:126: undefined reference to `CommandLineToArgvW'
       [cc] collect2: ld returned 1 exit status


I tried reordering the -l options on the gcc command, but did not seem to have any effect.

I guess I should see if the problem goes away with the version of MinGW that you are using.

Reply via email to