Lars Schouw | 2 Dec 2009 12:44
Picon
Favicon

Re: How to build a x64 library on windows with Visual Studio?

Hi Tom,

You need to open the solution in VS2008 and then select build -> Configuration manager. Then select new under active platform and choose to copy the win32 to x64. I the projects you need to replace WIN32 with WIN64. There might be more you need to do... that is a good start.

I assume is is the same under VS2005.

Lars

From: Zhou Tao <zhoutao109 <at> gmail.com>
To: log4cxx-user <at> logging.apache.org
Sent: Fri, September 4, 2009 12:34:54 AM
Subject: How to build a x64 library on windows with Visual Studio?

Hi all,
 
I am trying to build the log4cxx libraries on a Windows x64 2003 server. I use a Visual Studio 2005 as the compiling tool.
 
I can build the APR, APR-UTIL with x64 option, however for log4cxx.dsp the x64 option in Visual Studio 2005 is disabled.
 
So how to use or build the log4cxx on a winx64 server.
 
Thanks tons,
 
Tom

Lars Schouw | 2 Dec 2009 12:50
Picon
Favicon

Re: How to build a x64 library on windows with Visual Studio?

By replacing WIN32 with WIN64 I mean that you need to 

find all #ifdef WIN32 etc.. and replace them with #ifdef WIN64

From: Lars Schouw <schouwla <at> yahoo.com>
To: Log4CXX User <log4cxx-user <at> logging.apache.org>
Sent: Wed, Decem ber 2, 2009 8:44:02 PM
Subject: Re: How to build a x64 library on windows with Visual Studio?

Hi Tom,

You need to open the solution in VS2008 and then select build -> Configuration manager. Then select new under active platform and choose to copy the win32 to x64. I the projects you need to replace WIN32 with WIN64. There might be more you need to do... that is a good start.

I assume is is the same under VS2005.

Lars

From: Zhou Tao <zhoutao109 <at> gmail.com>
To: log4cxx-user <at> logging.apache.org
Sent: Fri, September 4, 2009 12:34:54 AM
Subject: How to build a x64 library on windows with Visual Studio?

Hi all,
 
I am trying to build the log4cxx libraries on a Windows x64 2003 server. I use a Visual Studio 2005 as the compiling tool.
 
I can build the APR, APR-UTIL with x64 option, however for log4cxx.dsp the x64 option in Visual Studio 2005 is disabled.
 
So how to use or build the log4cxx on a winx64 server.
 
Thanks tons,
 
Tom


Zhou Tao | 2 Dec 2009 15:21
Picon

Re: How to build a x64 library on windows with Visual Studio?

Hi Lars,
 
Thanks your response.
 
I have ported the log4cxx to a new VS2005 project which is defined to be x64 and build with APR, APR-util in the same solution. But I don't replace the WIN32 with WIN64 and still use the WIN32 on windows64 platform. Though I got some warning message when to build the APR libs, finally I build out the log4cxx dll. And used it in my application, so far it works well.
 
Thanks,
Tom
2009/12/2 Lars Schouw <schouwla <at> yahoo.com>
By replacing WIN32 with WIN64 I mean that you need to 

find all #ifdef WIN32 etc.. and replace them with #ifdef WIN64

From: Lars Schouw <schouwla <at> yahoo.com>
To: Log4CXX User <log4cxx-user <at> logging.apache.org>
Sent: Wed, December 2, 2009 8:44:02 PM
Subject: Re: How to build a x64 library on windows with Visual Studio?

Hi Tom,

You need to open the solution in VS2008 and then select build -> Configuration manager. Then select new under active platform and choose to copy the win32 to x64. I the projects you need to replace WIN32 with WIN64. There might be more you need to do... that is a good start.

I assume is is the same under VS2005.

Lars

From: Zhou Tao <zhoutao109 <at> gmail.com>
To: log4cxx-user <at> logging.apache.org
Sent: Fri, September 4, 2009 12:34:54 AM
Subject: How to build a x64 library on windows with Visual Studio?

Hi all,
 
I am trying to build the log4cxx libraries on a Windows x64 2003 server. I use a Visual Studio 2005 as the compiling tool.
 
I can build the APR, APR-UTIL with x64 option, however for log4cxx.dsp the x64 option in Visual Studio 2005 is disabled.
 
So how to use or build the log4cxx on a winx64 server.
 
Thanks tons,
 
Tom





--
Thanks and Regards,
Tom
Curt Arnold | 4 Dec 2009 04:53
Picon
Favicon

Re: How to build a x64 library on windows with Visual Studio?

I do not believe that you should need to change any code.  Been a while since I've tested a Win64 build, but I
think the Ant driven VC++ build completed without issue.  Don't recall the experience building within
Visual Studio.

Likely a project file issue.  The .vcproj file in the release is generated from the Ant build script, not
Visual Studio, so it might be missing some features.  You could likely generate an empty project file in
Visual Studio and then copy the guts of the .vcproj in the release and it would resolve the issue.

_WIN32 is defined for all Windows builds including x86_64 and Itanium builds.  _WIN64 is only defined for
64-bit builds.  The only place you need to have _WIN64 is where the code differs between 64 and 32 bit Windows
and in general that is usually places where the _WIN64 code would work with current 32-bit compilers but
the 32-bit specific code will work with VC 6 and the like.
Rhys Ulerich | 18 Dec 2009 23:08
Picon
Gravatar

Using log4cxx::logstream in generic programming

Hi all,

I'd like to be able to use log4cxx::logstream instances within generic
programming.  My goal is pass log4cxx::logstream instances into
templated code expecting basic_ostream instances and have everything
work out.

I've run into two problems.

First, there's no generic way to use std::endl for both
log4cxx::logstream and std::basic_ostream.  Here's a test case against
log4cxx 0.10.0 that illustrates the difficulty:

#include <iostream>
#include <log4cxx/logger.h>
#include <log4cxx/stream.h>

template< typename OStream >
void test_it(OStream & os)
{
    // std::endl<Elem,Tr> can be deduced for std::cout argument
    // std::endl<Elem,Tr> cannot be deduced for log4cxx::logstream argument
    os << "Foo" << std::endl;

    // std::endl<char,std::traits<char> > works for std::cout and
    // log4cxx::logstream
    os << "Bar" << std::endl<char, std::char_traits<char> >;

    // std::endl<typename OStream::char_type, std::char_traits<typename
    // OStream::char_type> works for std::cout but does not work for
    // log4cxx::logstream due to no char_type typedef
    os << "Baz" << std::endl<typename OStream::char_type,
std::char_traits<typename OStream::char_type> >;
}

int main(int argc, char* argv[]) {

    test_it(std::cout);

    log4cxx::LoggerPtr logger = log4cxx::Logger::getRootLogger();
    log4cxx::logstream logstream(logger, log4cxx::Level::getInfo());

    test_it(logstream);

    return 0;
}

I expect that at least the "Baz" line works for both std::cout and
log4cxx::logbase, and ideally the "Foo' line would too.  At least for
the "Baz" case it occurs because log4cxx::logstream lacks typedefs a
la basic_ostream
(http://www.dinkumware.com/manuals/default.aspx?manual=compleat&page=ostream.html#basic_ostream).
 I'm not sure if the "Foo" case could be made to work.  If the "Baz"
case worked it might just require adding a template declarations to
log4cxx/stream.h that attempts to use the char_type and traits_type
typedef to fix the appropriate std::endl template.

Second, even if the first part did work, it seems that without the
magic log4cxx_base::endmsg manipulator that the messages are never
written.  This is much less than generic, and I'd like to have
std::endl take the role of log4stream_base::endmsg whenever it is
encountered.  From looking at Stroustrup's C++ programming language
section 21.4.6 I don't see how to intercept the single std::endl
manipulator and cause it to insert a log4stream_base::endmsg.  I could
be missing something.

Any help appreciated,
Rhys

Fabian Jacquet | 22 Dec 2009 15:41
Picon

Crash on ustring.compare

Hi all,

I use libxml++ 2.26.1 on windows and I have a crash some times if I create a lot of XML in multi-thread.

I can solve my problem by writing those line at the beginning of my program:

            if(!Glib::thread_supported())

                        Glib::thread_init();



Do you know why?
If it's normal, do you think this method must be call within libXML++?

Or maybe you know another solution?

Best regards
Rhett.DeWall | 22 Dec 2009 19:02
Picon
Favicon

Rhett DeWall is out of the office.


I will be out of the office starting  12/19/2009 and will not return until
01/04/2010.

If you need immediate assistance, please contact Chris Huston  <at>  218-6389;
otherwise, I will respond to your message when I return.


Gmane