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 Peter Steiner <pe...@hugwi.ch> on 2005/03/16 14:44:09 UTC
static VS2003 builds supported?
Hello!
I'm trying to integrate log4cxx into a new Visual Studio 2003 project
and tried to use the static library.
Using the current CVS head (from 2005-03-15 16:00GMT), I have found
several problems:
- INSTALL: typo in Build options description:
"-Dlibtype" instead of "-Dlib.type"
- During "ant -Dlib.type=static": build-shortsocketserver fails
(I have not investigated this as the library itself is built at this
time)
- msvc/static/static.cpp doesn't exist anymore,
but it is still referenced in config_msvc.h.in and portability.h
This leads to linker errors not finding ForceSymbolReferences.
After removing these #pragma comment lines in both files, I was
able to link and run my (very simple) test program.
Is the static library still supported or are there reasons to avoid the
static library other than to save space?
Regards, Peter
--
_ _ Peter Steiner <pe...@hugwi.ch>
/ /_/ / Hug-Witschi AG <http://www.hugwi.ch/>
/ _ / Electronic Engineering
/_/ /_/ _ _ Auriedstrasse 10
/ / / / / / CH-3178 Boesingen
/ /_/ /_/ / Tel +41 31 740 44 44
/_ _ _ _ _/ Fax +41 31 740 44 45
Re: static VS2003 builds supported?
Posted by Curt Arnold <ca...@apache.org>.
On Mar 16, 2005, at 7:44 AM, Peter Steiner wrote:
> Hello!
>
> I'm trying to integrate log4cxx into a new Visual Studio 2003 project
> and tried to use the static library.
>
> Using the current CVS head (from 2005-03-15 16:00GMT), I have found
> several problems:
>
> - INSTALL: typo in Build options description:
> "-Dlibtype" instead of "-Dlib.type"
> - During "ant -Dlib.type=static": build-shortsocketserver fails
> (I have not investigated this as the library itself is built at this
> time)
> - msvc/static/static.cpp doesn't exist anymore,
> but it is still referenced in config_msvc.h.in and portability.h
> This leads to linker errors not finding ForceSymbolReferences.
> After removing these #pragma comment lines in both files, I was
> able to link and run my (very simple) test program.
>
> Is the static library still supported or are there reasons to avoid the
> static library other than to save space?
>
Thanks for the report. Any breakage of the static build was due to
neglect, not intent, and it is likely broken on all platforms. I'll
see what I can do to get it functional again.
If you are calling log4cxx from a DLL, then it would be beneficial to
use the log4cxx.dll so both the application executable and application
dll could share the same log system.
Re: static VS2003 builds supported?
Posted by Peter Steiner <pe...@hugwi.ch>.
On Wed, 16 Mar 2005 13:34:30 -0600, Curt Arnold wrote:
> On Mar 16, 2005, at 7:44 AM, Peter Steiner wrote:
>> Hello!
>>
>> I'm trying to integrate log4cxx into a new Visual Studio 2003 project
>> and tried to use the static library.
>>
>> Using the current CVS head (from 2005-03-15 16:00GMT), I have found
>> several problems:
>>
> I've attempted to address these issues without resorting to Microsoft
> specific pragmas. I've put in code into configurator.cpp which should
> force the stock appenders, layouts and filters to be linked. The
> rationale was the only time that you need to load classes by name are
> within the configurators and if you don't use a configurator, then you
> shouldn't be forced to link in appenders that you won't use.
That work nicely for me, thanks!
Regards, Peter
--
_ _ Peter Steiner <pe...@hugwi.ch>
/ /_/ / Hug-Witschi AG <http://www.hugwi.ch/>
/ _ / Electronic Engineering
/_/ /_/ _ _ Auriedstrasse 10
/ / / / / / CH-3178 Boesingen
/ /_/ /_/ / Tel +41 31 740 44 44
/_ _ _ _ _/ Fax +41 31 740 44 45
Re: static VS2003 builds supported?
Posted by Curt Arnold <ca...@apache.org>.
On Mar 16, 2005, at 7:44 AM, Peter Steiner wrote:
> Hello!
>
> I'm trying to integrate log4cxx into a new Visual Studio 2003 project
> and tried to use the static library.
>
> Using the current CVS head (from 2005-03-15 16:00GMT), I have found
> several problems:
>
I've attempted to address these issues without resorting to Microsoft
specific pragmas. I've put in code into configurator.cpp which should
force the stock appenders, layouts and filters to be linked. The
rationale was the only time that you need to load classes by name are
within the configurators and if you don't use a configurator, then you
shouldn't be forced to link in appenders that you won't use.
One of the default configuration tests was failing with VC but not with
gcc, so there is still probably some tweaking left to do, but it should
be in the ballpark. I've also added a static build to Gump.