You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-dev@logging.apache.org by Björn Berg <bj...@googlemail.com> on 2013/03/07 13:35:57 UTC

Problem compiling log4cxx-0.10.0 with MINGW

Hi,

I have a problem compiling log4cxx 0.10.0 on Windows 7 64-Bit with MinGW.

I followed the instructions found on the internet for compiling apr and
apr-util and then log4cxx. apr and apr-util compile fine without problems,
but when it comes to log4cxx I get the error:

libtool: link: g++ -g -O2 -o .libs/trivial.exe trivial.o
-L/usr/local/apr/lib -
L/c/build/logging/expat-2.1.0/lib -L/usr/local/lib
../../../src/main/cpp/.libs/l
iblog4cxx.a /usr/local/apr/lib/libaprutil-1.a /usr/local/lib/libexpat.dll.a
/usr
/local/apr/lib/libexpat.a /mingw/lib/libiconv.dll.a
/usr/local/apr/lib/libapr-1.
a -lshell32 -ladvapi32 -lkernel32 -lmsvcrt -lrpcrt4 -lws2_32 -L/mingw/lib
-L/usr
/local/lib
C:/MinGW/msys/1.0/local/apr/lib/libapr-1.a(open.o): In function
`apr_file_link':
c:\build\logging\apr/file_io/win32/open.c:602: undefined reference to
`CreateHar
dLinkW'
collect2.exe: error: ld returned 1 exit status
make[3]: *** [trivial.exe] Error 1
make[3]: Leaving directory
`/c/build/logging/apache-log4cxx-0.10.0/src/examples/
cpp'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory
`/c/build/logging/apache-log4cxx-0.10.0/src/examples'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/c/build/logging/apache-log4cxx-0.10.0/src'
make: *** [all-recursive] Error 1

Has anybody else encountered this problems?

Something about the other sources:
expat 2.1.0
apr 1.4.2
apr-util 1.3.12

Any help is appreciated.

Kind regards,
Björn

Re: Problem compiling log4cxx-0.10.0 with MINGW

Posted by Björn Berg <bj...@googlemail.com>.
Thanks for the fast response.
Trunk contains apr 2.0.0 which merged apr-util. Building log4cxx against
apr-2.0.0 does not work with Flag --with-apr=/usr/local/apr.

Configure breaks with:
checking for APR... configure: error: the --with-apr parameter is
incorrect. It must specify an install prefix, a build directory, or an
apr-config file.

Any idea?


2013/3/7 Joseph Southwell <jo...@southwell.org>

>
> http://mail-archives.apache.org/mod_mbox/apr-dev/201103.mbox/%3cAANLkTinkOi85SKi5xSPsgSzWec5Qb6fxcOFK73jvqjeL@mail.gmail.com%3e
>
> perhaps this will lead you somewhere useful? It looks like apr trunk works.
>
> Joseph Southwell
> joseph@southwell.org
> The past is history,
> The future's a mystery,
> The present's a gift.
>
>
> On Mar 7, 2013, at 6:35 AM, Björn Berg <bj...@googlemail.com>
> wrote:
>
> > Hi,
> >
> > I have a problem compiling log4cxx 0.10.0 on Windows 7 64-Bit with MinGW.
> >
> > I followed the instructions found on the internet for compiling apr and
> apr-util and then log4cxx. apr and apr-util compile fine without problems,
> but when it comes to log4cxx I get the error:
> >
> > libtool: link: g++ -g -O2 -o .libs/trivial.exe trivial.o
>  -L/usr/local/apr/lib -
> > L/c/build/logging/expat-2.1.0/lib -L/usr/local/lib
> ../../../src/main/cpp/.libs/l
> > iblog4cxx.a /usr/local/apr/lib/libaprutil-1.a
> /usr/local/lib/libexpat.dll.a /usr
> > /local/apr/lib/libexpat.a /mingw/lib/libiconv.dll.a
> /usr/local/apr/lib/libapr-1.
> > a -lshell32 -ladvapi32 -lkernel32 -lmsvcrt -lrpcrt4 -lws2_32
> -L/mingw/lib -L/usr
> > /local/lib
> > C:/MinGW/msys/1.0/local/apr/lib/libapr-1.a(open.o): In function
> `apr_file_link':
> > c:\build\logging\apr/file_io/win32/open.c:602: undefined reference to
> `CreateHar
> > dLinkW'
> > collect2.exe: error: ld returned 1 exit status
> > make[3]: *** [trivial.exe] Error 1
> > make[3]: Leaving directory
> `/c/build/logging/apache-log4cxx-0.10.0/src/examples/
> > cpp'
> > make[2]: *** [all-recursive] Error 1
> > make[2]: Leaving directory
> `/c/build/logging/apache-log4cxx-0.10.0/src/examples'
> > make[1]: *** [all-recursive] Error 1
> > make[1]: Leaving directory `/c/build/logging/apache-log4cxx-0.10.0/src'
> > make: *** [all-recursive] Error 1
> >
> > Has anybody else encountered this problems?
> >
> > Something about the other sources:
> > expat 2.1.0
> > apr 1.4.2
> > apr-util 1.3.12
> >
> > Any help is appreciated.
> >
> > Kind regards,
> > Björn
>
>

Re: Problem compiling log4cxx-0.10.0 with MINGW

Posted by Joseph Southwell <jo...@southwell.org>.
http://mail-archives.apache.org/mod_mbox/apr-dev/201103.mbox/%3cAANLkTinkOi85SKi5xSPsgSzWec5Qb6fxcOFK73jvqjeL@mail.gmail.com%3e

perhaps this will lead you somewhere useful? It looks like apr trunk works.

Joseph Southwell
joseph@southwell.org
The past is history,
The future's a mystery,
The present's a gift.


On Mar 7, 2013, at 6:35 AM, Björn Berg <bj...@googlemail.com> wrote:

> Hi,
>  
> I have a problem compiling log4cxx 0.10.0 on Windows 7 64-Bit with MinGW.
>  
> I followed the instructions found on the internet for compiling apr and apr-util and then log4cxx. apr and apr-util compile fine without problems, but when it comes to log4cxx I get the error:
>  
> libtool: link: g++ -g -O2 -o .libs/trivial.exe trivial.o  -L/usr/local/apr/lib -
> L/c/build/logging/expat-2.1.0/lib -L/usr/local/lib ../../../src/main/cpp/.libs/l
> iblog4cxx.a /usr/local/apr/lib/libaprutil-1.a /usr/local/lib/libexpat.dll.a /usr
> /local/apr/lib/libexpat.a /mingw/lib/libiconv.dll.a /usr/local/apr/lib/libapr-1.
> a -lshell32 -ladvapi32 -lkernel32 -lmsvcrt -lrpcrt4 -lws2_32 -L/mingw/lib -L/usr
> /local/lib
> C:/MinGW/msys/1.0/local/apr/lib/libapr-1.a(open.o): In function `apr_file_link':
> c:\build\logging\apr/file_io/win32/open.c:602: undefined reference to `CreateHar
> dLinkW'
> collect2.exe: error: ld returned 1 exit status
> make[3]: *** [trivial.exe] Error 1
> make[3]: Leaving directory `/c/build/logging/apache-log4cxx-0.10.0/src/examples/
> cpp'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/c/build/logging/apache-log4cxx-0.10.0/src/examples'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/c/build/logging/apache-log4cxx-0.10.0/src'
> make: *** [all-recursive] Error 1
>  
> Has anybody else encountered this problems?
>  
> Something about the other sources:
> expat 2.1.0
> apr 1.4.2
> apr-util 1.3.12
>  
> Any help is appreciated.
>  
> Kind regards,
> Björn