I've solved the problem. I eventually managed to build log4cxx with stlport by 
updating the build.xml with stlport_gcc library references and adding the 
stlport include directory to all ant cc commands. i.e.
 
In build.xml.
 
In place of the existing libset gcc rule:
<libset libs="stlport_gcc" dir"../stlport/lib" if="is-gcc"/>
 
In all <cc .../> rules add:
<includepath path="../stlport/stlport"
 
build using ant build as usual:
ant clean build
 
This builds log4cxx using stlport support.
 
Now my test application and other stlport applications compile with log4cxx 
successfully and run.

________________________________

From: David Sewell [mailto:[EMAIL PROTECTED]
Sent: Thu 23/06/2005 11:54
To: Log4CXX User
Subject: RE: RE: log4cxx-CVS with stlport-4.6 application build fails


Can you provide details of how you built log4cxx to include stlport support, I 
will try and replicate with log4cxx-CVS.
 
I've tried updating the ant build files with stlport includes and libs but this 
just generates build errors. I can use automake scripts they fail in 
config.status (.infig.status: error: cannot find input file:), this is a common 
error with cygwin but I can't find a solution for linux.
 
David

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Thu 23/06/2005 02:53
To: Log4CXX User
Subject: Re: RE: log4cxx-CVS with stlport-4.6 application build fails



Hi,David Sewell:
I have successfully intergreted log4cxx-0.9.7 with stlport-4.6 in RH9

>Andreas,
>
>I'm using the following build processes.
>
>With the packages and test app installed in the following directories:
>
>log4cxx-CVS = ./log4cxx
>stlport-4.6 = ./stlport
>test app = ./log4cxx_sample
>
>log4cxx build process (I had to upgrade autoconf to 2.59):
>cd log4cxx; ant build
>
>stlport build process (using gcc.mak file, gcc-linux.mak fails):
>cd ../stlport/src; make -f gcc.mak
>
>I have not successfully integrated stlport with the log4cxx build process, 
>I've tried using the automake approach which may allow me to add the stlport 
>support via CXXFLAGS the LDFLAGS environment variables but the configure 
>process fails in config.status (another problem I can't solve). This is 
>probably the root cause of my problems. Does stlport support need to be built 
>into the log4cxx libraries?
>
>Once log4cxx and stlport are built I can build the test application. Source 
>and makefile are attached below.
>
>e.g.
>cd ../log4cxx_sample; make
>
>Thanks,
>David
>
>/************************************************
> * file: main.cpp
> ************************************************/
>#include <log4cxx/logger.h>
>#include <log4cxx/basicconfigurator.h>
>#include <log4cxx/helpers/exception.h>
>using namespace log4cxx;
>using namespace log4cxx::helpers;
>LoggerPtr logger(Logger::getLogger("Test"));
>int main(int argc, char **argv)
>{
> int result = EXIT_SUCCESS;
> try
> {
>  BasicConfigurator::configure();
>  LOG4CXX_INFO(logger, "Entering application");
>  LOG4CXX_INFO(logger, "Exiting application");
> }
> catch(Exception&)
> {
>  result = EXIT_FAILURE;
> }
>
> return result;
>}
>
>#################################################
>
># file: Makefile
>
>#################################################
>
>SHELL=/bin/bash
>
>LOG4CXX_LINK_PREFIX=../log4cxx
>STLPORT_LINK_PREFIX=../stlport
>
>CXX=g++
>CXX_FLAGS=-g -Wall -DLINUX -Wno-ctor-dtor-privacy
>INCLUDES=-I$(LOG4CXX_LINK_PREFIX)/include -I${STLPORT_LINK_PREFIX}/stlport
you have include the headers successful, so your mistakes become:
... _STL::basic_string...
>LIBS=-L$(STLPORT_LINK_PREFIX)/lib -lstlport_gcc
here,  maybe you can change to
LIBS=-lstlport_gcc -Wl,--rpath -Wl,$(STLPORT_LINK_PREFIX)/lib
>LOG4CXX_LIBS=-L$(LOG4CXX_LINK_PREFIX)/build/debug/shared -llog4cxx
>SRCS := $(wildcard ./*.cpp)
>OBJS := $(patsubst %.cpp,%.o,$(SRCS))
>
>%.o: %.cpp
> @if [ `uname` = "SunOS" ]; \
>        then \
>                $(CXX) $(CXX_FLAGS) $(INCLUDES) -o $@ -c $<; \
>        else \
>                $(CXX) $(CXX_FLAGS) $(INCLUDES) -DLINUX -o $@ -c $<; \
>        fi
>
>all: log4cxx_sample
>
>clean_all: clean all
>
>log4cxx_sample: $(OBJS)
> $(CXX) $(CXX_FLAGS) $(INCLUDES) $(LOG4CXX_LIBS)  $(LIBS) -o log4cxx_sample 
> $(OBJS)
>
>clean:
> rm log4cxx_sample *.o
>
>
>
>________________________________
>
>From: Andreas Fester [mailto:[EMAIL PROTECTED]
>Sent: Wed 22/06/2005 16:40
>To: Log4CXX User; David Sewell
>Subject: Re: log4cxx-CVS with stlport-4.6 application build fails
>
>
>
>David,
>
>I would be interested in running a build test :-)
>I run Debian GNU/Linux 3.1, but lets see if I can
>reproduce the issue.
>
>Can you provide some more information how you configured
>log4cxx? Do you use the ant build (and if so, how do you
>integrate stlport) or the automake approach (and also,
>if so, how do you integrate stlport)?
>
>Regards,
>
>        Andreas
>
>David Sewell wrote:
>> I am trying to integrate log4cxx-CVS with an application that uses
>> stlport-4.6 on Linux (redhat es3) using g++ (3.2.3), however when I
>> add the stlport support to the compile line, the build fails with
>> "undefined reference" errors from the log4cxx library.
>>
>> I have rebuilt both log4cxx and stlport numerous times, as a test
>> case I have used the BasicConfigurator example from the log4cxx
>> documentation. This compiles and runs without the
>> '-I../stlport/stlport' flag but fails with the below error when the
>> flag is present. I can compile and run other applications using
>> stlport with no problems.
>>
>> I have searched all bug/support archives for both log4cxx and
>> stlport, the only documented issues that reference both libraries
>> don't seem to be relevant. I'm now at a loss as to what to do.
>>
>> Can someone confirm if log4cxx-CVS is known to work with stlport-4.6
>> on Linux?
>>
>> Any suggestions for what may be wrong and how I can resolve the
>> problem would be appreciated.
>>
>> I can include my test case source code and makefile if anyone has a
>> suitable environment and is interested in running a build test.
>>
>> Thanks, David
>>
>> Example Compile Failure:
>>
>> g++ -g -Wall -DLINUX -Wno-ctor-dtor-privacy -I../log4cxx/include
>> -I../stlport/stlport -L../log4cxx/build/debug/shared -llog4cxx  -o
>> log4cxx_sample main.o com/foo/bar.o  -L../stlport/lib -lstlport_gcc
>> main.o(.text+0x97): In function `main':
>> ../log4cxx/include/log4cxx/helpers/objectptr.h:88: undefined
>> reference to
>> `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level>
>> const&, _STL::basic_string<char, _STL::char_traits<char>,
>> _STL::allocator<char> > const&, log4cxx::spi::LocationInfo const&)'
>> main.o(.text+0x1a0): In function `main':
>> /disk2/data/eclipse/workspace/log4cxx_sample/main.cpp:23: undefined
>> reference to
>> `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level>
>> const&, _STL::basic_string<char, _STL::char_traits<char>,
>> _STL::allocator<char> > const&, log4cxx::spi::LocationInfo const&)'
>> com/foo/bar.o(.text+0x87): In function `com::foo::Bar::doIt()':
>> ../log4cxx/include/log4cxx/helpers/objectptr.h:88: undefined
>> reference to
>> `log4cxx::Logger::forcedLog(log4cxx::helpers::ObjectPtrT<log4cxx::Level>
>> const&, _STL::basic_string<char, _STL::char_traits<char>,
>> _STL::allocator<char> > const&, log4cxx::spi::LocationInfo const&)'
>> collect2: ld returned 1 exit status make: *** [log4cxx_sample] Error
>> 1
>>
>>
>>
>>
>
>
>--
>Andreas Fester
>mailto:[EMAIL PROTECTED]
>WWW: http://littletux.homelinux.org
>ICQ: 326674288
>
>
>
>
>.

= = = = = = = = = = = = = = = = = = = =
                       

?????????
?!

                                
????????energumen
[EMAIL PROTECTED]
??????????2005-06-23



<<winmail.dat>>

Reply via email to