You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by Joseph Fradley <jo...@fradeng.com> on 2014/03/18 15:17:12 UTC

Status of log4cxx under Windows using VS 2010

Hello,

FWIW, this guy had the best HOW-TO to compile log4cxx on Windows using VS
2010.

http://www.codeproject.com/Tips/492585/How-to-build-log4cxx-with-Visual-Studio-2010

I'm going to be evaluating with my C/C++ app. Is there any known show
stoppers that I should know about (under Windows with VS 2010)?

Thank you,
Joe

Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Mittwoch, 17. September 2014 um 03:20 schrieben Sie:

> This is discouraging. :(  In the research I had done, log4cxx kept turning up
> as recommended software and that it was compilable under VC6. I guess that must
> have been true of the latest stable release, 0.10.0. It doesn't sound like the
> newer/next release of log4cxx can be built under VC6 any more.

Regarding the logs, fallbackerrorhandler.h has not been touched since
0.10.0. And regarding ODBC, I guess you just need to deactivate it for
the build as I said before.

> I guess it's not
> too surprising since VC6 is pretty old. Oh well, I tried, and thanks very much
> for your help. I still want to try to use log4cxx since it is so highly
> recommended, I'll just have to try a newer version of VC.

Luckily we have the express editions these days. :-)

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> I guess the warnings there are because of your old compiler, that's
> something you need to fiddle on your own... The ODBC error may be
> removed using "with-ODBC=no", because the default behavior is "auto",
> which enables ODBC by default on Windows. The documentation is wrong
> in that part, I fixed that on trunk already but didn't update the
> site.
> 
> Regarding fallbackerrorhandler.h, I guess the problem here is with
> your old compiler as well, but have no idea right now. Have a look at
> the file and object.h for the cast macros and see if you somehow can
> get them working by rewriting or if they are needed at all...
> 


Hi Thorsten,

This is discouraging. :(  In the research I had done, log4cxx kept turning up 
as recommended software and that it was compilable under VC6. I guess that must 
have been true of the latest stable release, 0.10.0. It doesn't sound like the 
newer/next release of log4cxx can be built under VC6 any more. I guess it's not 
too surprising since VC6 is pretty old. Oh well, I tried, and thanks very much 
for your help. I still want to try to use log4cxx since it is so highly 
recommended, I'll just have to try a newer version of VC.



Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Montag, 8. September 2014 um 08:55 schrieben Sie:

> I thought I did. I provided a link to the complete compile log, with all
> errors, here: http://pastebin.com/zpKfm7i9

Sorry, I've missed the link. Regarding ODBC, it seems intptr_t is
missing and needs to be included from somewhere, MSDN suggests
stddef.h. I've implemented a workaround for a maybe similar problem
for C++ Builder, but just can't remember anymore if it was for the
same missing types. Doesn't matter, the important thing is that it's
only applied if C++ Builder is the chosen compile, therefore the
workaround may work for you as well. Search apr-util-build.xml for
"bcc-needs-stdint" and do what it does manually to the mentioned
header file, either with the included stated there or stddef.h or
where ever the missing type comes from. If that fixes some of the ODBC
compile errors we can think of a way to include this workaround in the
build as well.

> I did a search through my build folders apache-ant-1.9.4, apache-log4cxx-
> from-svn.140907, apache-maven-3.2.3, apr, apr-util and there is only one file
> that defines XMLPARSEAPI: apr-util\xml\expat\lib\expat.h

That's bad, you need to test that on your own using #ifdef ... and
#error in expat.h right before the macro gets defined there.

> To see if I could make some progress in getting log4cxx to build, I decided
> to temporarily disable ODBC by editing apr-util\include\apu.hw and setting
> APU_HAVE_ODBC to zero. Here's the complete log: http://pastebin.com/qcHmZX4f

I guess the warnings there are because of your old compiler, that's
something you need to fiddle on your own... The ODBC error may be
removed using "with-ODBC=no", because the default behavior is "auto",
which enables ODBC by default on Windows. The documentation is wrong
in that part, I fixed that on trunk already but didn't update the
site.

Regarding fallbackerrorhandler.h, I guess the problem here is with
your old compiler as well, but have no idea right now. Have a look at
the file and object.h for the cast macros and see if you somehow can
get them working by rewriting or if they are needed at all...

Sorry, but I don't have the time to look into this any more detailed.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Hi Thorsten,


> You need to provide all of the errors

I thought I did. I provided a link to the complete compile log, with all 
errors, here: http://pastebin.com/zpKfm7i9

Regarding the problem with XMLPARSEAPI:

> No idea currently, only found the following which suggests you are
> defining the same macro differently for some reason.

I did a search through my build folders apache-ant-1.9.4, apache-log4cxx-
from-svn.140907, apache-maven-3.2.3, apr, apr-util and there is only one file 
that defines XMLPARSEAPI: apr-util\xml\expat\lib\expat.h

If XMLPARSEAPI is being defined differently, it isn't by me that I know of, 
since I'm using expat.h as provided by apr-util. In fact, I have not even 
attempted to add my own code anywhere since I just want to get log4cxx 
compiled.

To see if I could make some progress in getting log4cxx to build, I decided 
to temporarily disable ODBC by editing apr-util\include\apu.hw and setting 
APU_HAVE_ODBC to zero. Here's the complete log: http://pastebin.com/qcHmZX4f

No error 2 anymore but now there are new and different error and warning 
messages. I highlighted them in yellow to make it easy to scroll to them.




Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Sonntag, 7. September 2014 um 20:14 schrieben Sie:

> 1) Multiple errors when building apr_dbd_odbc.c. Of course, odbc is one of
> the appenders I do want to use with log4cxx. :(

You need to provide all of the errors, ODBC should be activated by
default. There might be some problem with your old VC6, I guess only
few people are using it anymore. The build generates or edits some
header files as well, have a look around apu.h*. For some compilers,
like Borland C++ Builder, I had to change the build to include
stdint.h for example, maybe your are missing some headers as well.

> 2) Identical error when compiling xmlparse.c and apr_xml.c:
>        [cc] C:\Documents and Settings\taa\Desktop\project92\apr-
> util\xml\expat\lib\expat.h(83) : note C6311: unknown(0) : see previous
> definition of 'XMLPARSEAPI'

No idea currently, only found the following which suggests you are
defining the same macro differently for some reason.

http://stackoverflow.com/questions/2676822/how-do-i-inhibit-note-c6311-in-microsoft-c-compiler

> [ERROR] C:\Documents and
> Settings\taa\Desktop\project92\apache-log4cxx-from-
> svn.140907\src\ant\apr-util-build.xml:284: cl failed with return code 2

Error code 2 normally means a missing file somewhere, you may use
Process Monitor from Sysinternals to follow the build process and see
which file is missing or try "mvn -X ..." which generates a lot of
debug output.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Sonntag, 7. September 2014 um 02:32 schrieben Sie:
> 
> > I had used TortoiseSVN Repository Browser to download trunk and didn't
> > realize it would be incomplete.
> 
> It normally isn't, it doesn't matter which client or OS you use to
> checkout, you should always get the same content. Did you maybe only
> checkout "src" instead of trunk?
> 
> > Just to clarify, after I did 'svn checkout' on my Linux box I 
transferred
> > the etnire contents to Win XP. I'm still doing the build on Win XP and 
not
> > Linux.
> 
> That shouldn't be necessary and is unsupported by Subversion as well,
> you should avoid such things. Instead checkout using Tortoise again
> and double check the paths you select in the browser and get
> afterwards in your file system. I user Tortoise myself, there really
> is no problem with checking out trunk or whatever. I even checked out
> the whole directory structure with all tags and branches.
> 
> > [ERROR] C:\Documents and
> > Settings\taa\Desktop\project92\apache-log4cxx-from-
> > svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException:
> > Cannot run program "where": CreateProcess error=2, The system cannot 
find
> > the file specified
> [...]
> > Where do I get the program 'where'?
> 
> This is by default available on newer versions of Windows, so just buy
> a Windows 8 and get happy.  I removed the logic which used
> where.exe, it has been introduced to make the build usable with
> another compiler, but it looks as if this goal can't be reached with
> the current approach anyways. So update your trunk and give it another
> try.
> 
> https://issues.apache.org/jira/browse/LOGCXX-421
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi Thorsten,

You're right -- I downloaded only src by mistake and not trunk so pom.xml 
was missing because of that.

I downloaded the latest trunk this morning and have new and different build 
errors. Complete log is here: http://pastebin.com/zpKfm7i9

Short version:

1) Multiple errors when building apr_dbd_odbc.c. Of course, odbc is one of 
the appenders I do want to use with log4cxx. :(

2) Identical error when compiling xmlparse.c and apr_xml.c:
       [cc] C:\Documents and Settings\taa\Desktop\project92\apr-
util\xml\expat\lib\expat.h(83) : note C6311: unknown(0) : see previous 
definition of 'XMLPARSEAPI'

3) Ending build errors:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.7:run (compile) on project apache-log4cxx: An Ant BuildException 
has occured: The following error occurred while executing this line:
[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\build.xml:644: The following error occurred while executing this 
line:
[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\src\ant\apr-util-build.xml:284: cl failed with return code 2
[ERROR] around Ant part ...<ant target="build"/>... @ 4:24 in C:\Documents 
and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140907\target\antrun\build-main.xml


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Sonntag, 7. September 2014 um 02:32 schrieben Sie:

> I had used TortoiseSVN Repository Browser to download trunk and didn't
> realize it would be incomplete.

It normally isn't, it doesn't matter which client or OS you use to
checkout, you should always get the same content. Did you maybe only
checkout "src" instead of trunk?

> Just to clarify, after I did 'svn checkout' on my Linux box I transferred
> the etnire contents to Win XP. I'm still doing the build on Win XP and not
> Linux.

That shouldn't be necessary and is unsupported by Subversion as well,
you should avoid such things. Instead checkout using Tortoise again
and double check the paths you select in the browser and get
afterwards in your file system. I user Tortoise myself, there really
is no problem with checking out trunk or whatever. I even checked out
the whole directory structure with all tags and branches.

> [ERROR] C:\Documents and
> Settings\taa\Desktop\project92\apache-log4cxx-from-
> svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException:
> Cannot run program "where": CreateProcess error=2, The system cannot find
> the file specified
[...]
> Where do I get the program 'where'?

This is by default available on newer versions of Windows, so just buy
a Windows 8 and get happy. ;-) I removed the logic which used
where.exe, it has been introduced to make the build usable with
another compiler, but it looks as if this goal can't be reached with
the current approach anyways. So update your trunk and give it another
try.

https://issues.apache.org/jira/browse/LOGCXX-421

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Just to clarify, after I did 'svn checkout' on my Linux box I transferred 
the etnire contents to Win XP. I'm still doing the build on Win XP and not 
Linux.


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Mittwoch, 3. September 2014 um 07:43 schrieben Sie:
> 
> > (I hope it's not
> > a problem that I'm using the latest version of Maven, 3.x, and not 2.x 
as
> > listed in this URL.)
> 
> No:
> 
> > C:\Users\tschoening>mvn --version
> > Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 
17:22:2
> > 2+0200)
> 
> > So a new dependency has surfaced: Where do I get the necessary POM file?
> 
> pom.xml is the file and needed and should be contained in your
> checkout, depending on what you checked out exactly you might just be
> in the wrong path. You need to execute maven directly from the
> directory containing pom.xml, should be trunk.
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi Thorsten,

I had used TortoiseSVN Repository Browser to download trunk and didn't 
realize it would be incomplete. I did an 'svn checkout' on my Linux box to 
get a brand new copy of trunk as of Sep 5, 2014. Now 'mvn package' gets a 
lot further, but now it gives a build failure with the following message:

-----

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-
plugin:1.7:run (compile) on project apache-log4cxx: An Ant BuildException 
has occured: The following error occurred while executing this line:

[ERROR] C:\Documents and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140905\src\ant\common.xml:102: Execute failed: java.io.IOException: 
Cannot run program "where": CreateProcess error=2, The system cannot find 
the file specified

[ERROR] around Ant part ...<ant target="build"/>... @ 4:24 in C:\Documents 
and Settings\taa\Desktop\project92\apache-log4cxx-from-
svn.140905\target\antrun\build-main.xml

-----

Where do I get the program 'where'?


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Mittwoch, 3. September 2014 um 07:43 schrieben Sie:

> (I hope it's not
> a problem that I'm using the latest version of Maven, 3.x, and not 2.x as
> listed in this URL.)

No:

> C:\Users\tschoening>mvn --version
> Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 17:22:2
> 2+0200)

> So a new dependency has surfaced: Where do I get the necessary POM file?

pom.xml is the file and needed and should be contained in your
checkout, depending on what you checked out exactly you might just be
in the wrong path. You need to execute maven directly from the
directory containing pom.xml, should be trunk.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Using VC6 on XP to build log4cxx from latest trunk

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Dienstag, 2. September 2014 um 06:13 schrieben Sie:
> 
> > 8. The steps at http://ant-contrib.sourceforge.net/ say to, "See the cc
> > tasks for installation instructions for cpptasks." When I go to the link 
for
> > 'cc' (http://ant-contrib.sourceforge.net/cpptasks/index.html) it says,
> > "Place cpptasks.jar into Ant's classpath by placing in Ant's lib 
> > directory..."
> 
> > But now I'm stuck because there is no cpptasks.jar in cpptasks-
1.0b5.zip.
> 
> Use maven, it's easy to install as well and will download cpptasks
> form a maven repository as Jar, else you might download it manually
> form whatever source you like. But I would prefer using maven, that's
> what I did as well.
> 
> http://mvnrepository.com/artifact/ant-contrib/cpptasks/1.0b5
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Hi again Thorsten,

I appreciate your patience as I work through all these dependencies.

I downloaded and extracted the latest stable version of Maven:

     C:\Documents and Settings\taa>mvn --version
     Apache Maven 3.2.3 (33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4; 2014-08-
11T13:58:10-07:00)
     Maven home: C:\Documents and Settings\taa\Desktop\project92\apache-
maven-3.2.3
     Java version: 1.8.0_20, vendor: Oracle Corporation
     Java home: C:\Program Files\Java\jdk1.8.0_20\jre
     Default locale: en_US, platform encoding: Cp1252
     OS name: "windows xp", version: "5.1", arch: "x86", family: "dos"

I'm now attempting to follow your advice to use Maven and perform the steps 
here: http://logging.apache.org/log4cxx/building/maven.html (I hope it's not 
a problem that I'm using the latest version of Maven, 3.x, and not 2.x as 
listed in this URL.)

Following the steps under "Building and testing log4cxx on a Microsoft 
Windows with APR and APR-Util built from source," Maven is complaining there 
is no POM file. Full log is here: http://pastebin.com/3b76Dmby

I tried doing 'mvn clean' but it gave the same "missing POM" error.

So a new dependency has surfaced: Where do I get the necessary POM file?


Re: Using VC6 on XP to build log4cxx from latest trunk [was Re: Status of log4cxx under Windows using VS 2010]

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Dienstag, 2. September 2014 um 06:13 schrieben Sie:

> 8. The steps at http://ant-contrib.sourceforge.net/ say to, "See the cc
> tasks for installation instructions for cpptasks." When I go to the link for
> 'cc' (http://ant-contrib.sourceforge.net/cpptasks/index.html) it says,
> "Place cpptasks.jar into Ant's classpath by placing in Ant's lib 
> directory..."

> But now I'm stuck because there is no cpptasks.jar in cpptasks-1.0b5.zip.

Use maven, it's easy to install as well and will download cpptasks
form a maven repository as Jar, else you might download it manually
form whatever source you like. But I would prefer using maven, that's
what I did as well.

http://mvnrepository.com/artifact/ant-contrib/cpptasks/1.0b5

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Using VC6 on XP to build log4cxx from latest trunk [was Re: Status of log4cxx under Windows using VS 2010]

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag ToddA,
> am Donnerstag, 28. August 2014 um 07:28 schrieben Sie:
> 
> > Can you clarify what you mean by "shouldn't be necessary"?
> 
> It shouldn't be necessary to use ANT to create VS project files
> because ANT can directly build your project using VS. You don't need
> the intermediate step of the VS project files.
> 
> > If ANT is not necessary
> 
> It is. 
> 
> > what are the proper steps to build log4cxx from trunk?
> 
> Follow the docs using ANT and optionally Maven, because Maven is
> currently just used as a frontend to the build logic implemented in
> ANT, and ask again if things don't work.
> 
> http://logging.apache.org/log4cxx/building/index.html
> 
> > I'm
> > attempting to build log4cxx using VC6 to integrate it with a VC6 project 
I'm
> > working on.
> 
> You have the option of creating the project files for VS, but I guess
> you don't need to, because ANT builds the project with my VS 2013
> Express directly.
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 

Hi Thorsten,

Thanks for your help. So far I've done the following:

1. Downloaded latest (as of 08/26/2014) log4cxx from trunk and put it in 
directory called: apache-log4cxx-from-svn

2. Installed jdk-8u20-windows-i586

3. Went here http://logging.apache.org/log4cxx/building/ant.html

4. Downloaded and extracted apache-ant-1.9.4-bin.zip.

5. Followed the steps in my extracted copy of apache-ant-
1.9.4/manual/index.html for Windows to set ANT_HOME and JAVA_HOME, and added 
%ANT_HOME%\bin to PATH.

6. Changed to %ANT_HOME% and ran: ant -f fetch.xml -Ddest=system
This resulted in a successful build message.

7. Downloaded and extracted cpptasks-1.0b5.zip.

8. The steps at http://ant-contrib.sourceforge.net/ say to, "See the cc 
tasks for installation instructions for cpptasks." When I go to the link for 
'cc' (http://ant-contrib.sourceforge.net/cpptasks/index.html) it says, 
"Place cpptasks.jar into Ant's classpath by placing in Ant's lib 
directory..."

But now I'm stuck because there is no cpptasks.jar in cpptasks-1.0b5.zip.

What is my next step?


Re: Status of log4cxx under Windows using VS 2010

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag ToddA,
am Donnerstag, 28. August 2014 um 07:28 schrieben Sie:

> Can you clarify what you mean by "shouldn't be necessary"?

It shouldn't be necessary to use ANT to create VS project files
because ANT can directly build your project using VS. You don't need
the intermediate step of the VS project files.

> If ANT is not necessary

It is. ;-)

> what are the proper steps to build log4cxx from trunk?

Follow the docs using ANT and optionally Maven, because Maven is
currently just used as a frontend to the build logic implemented in
ANT, and ask again if things don't work.

http://logging.apache.org/log4cxx/building/index.html

> I'm
> attempting to build log4cxx using VC6 to integrate it with a VC6 project I'm
> working on.

You have the option of creating the project files for VS, but I guess
you don't need to, because ANT builds the project with my VS 2013
Express directly.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Status of log4cxx under Windows using VS 2010

Posted by ToddA <st...@gmail.com>.
Thorsten Schöning <tschoening <at> am-soft.de> writes:

> 
> Guten Tag Joseph Fradley,
> am Dienstag, 18. März 2014 um 18:11 schrieben Sie:
> 
> > Thank you. Is Ant the preferred way to build log4cxx? I don't see the VS 
project files any more.
> 
> The project files are only part of a release, you can create those
> with ANT on your own but shouldn't be necessary. At least ANT works
> with VS 2013 Express for me.
> 
> Mit freundlichen Grüßen,
> 
> Thorsten Schöning
> 


Can you clarify what you mean by "shouldn't be necessary"? If ANT is not 
necessary, what are the proper steps to build log4cxx from trunk? I'm 
attempting to build log4cxx using VC6 to integrate it with a VC6 project I'm 
working on.



Re: Status of log4cxx under Windows using VS 2010

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Oscar Pernas,
am Freitag, 21. März 2014 um 10:19 schrieben Sie:

> I've compiled log4cxx in vs2010 following the same HOW-TO.

I would suggest using a current trunk with ANT following the official
docs, there shouldn't be any changes to the code necessary anymore to
successfully compile. If your errors still persists, we can dig into
those further. The ANT build provides running of some tests as well to
see if the created lib is generally usable.

http://logging.apache.org/log4cxx/source-repository.html
http://logging.apache.org/log4cxx/building/ant.html

> Now, If I start debugging, when I call to log4cxx configure method,
> an std::length_error is thrown only in debug. 

If this error persists with trunk, a stack trace would be helpful.

> Could be a project configuration problem? When are you planning to
> release a version with vs2010 support?   

There's no release date yet.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Status of log4cxx under Windows using VS 2010

Posted by Oscar Pernas <os...@pernas.es>.
Hi,

I've compiled log4cxx in vs2010 following the same HOW-TO. Everything went
fine, dll was generated. My problem started when I was linking with my app,
I had some weird errors like already defined object std::vector, resolved
including log4cxx.h in my files that was failing.

Now, If I start debugging, when I call to log4cxx configure method, an
std::length_error is thrown only in debug.
Could be a project configuration problem? When are you planning to release
a version with vs2010 support?

Thanks a million!





2014-03-18 19:30 GMT+01:00 Thorsten Schöning <ts...@am-soft.de>:

> Guten Tag Joseph Fradley,
> am Dienstag, 18. März 2014 um 18:11 schrieben Sie:
>
> > Thank you. Is Ant the preferred way to build log4cxx? I don't see the VS
> project files any more.
>
> The project files are only part of a release, you can create those
> with ANT on your own but shouldn't be necessary. At least ANT works
> with VS 2013 Express for me.
>
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
>


-- 
Óscar Pernas Plaza.

Re: Status of log4cxx under Windows using VS 2010

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Joseph Fradley,
am Dienstag, 18. März 2014 um 18:11 schrieben Sie:

> Thank you. Is Ant the preferred way to build log4cxx? I don't see the VS project files any more.

The project files are only part of a release, you can create those
with ANT on your own but shouldn't be necessary. At least ANT works
with VS 2013 Express for me.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Status of log4cxx under Windows using VS 2010

Posted by Joseph Fradley <jo...@fradeng.com>.
Thank you. Is Ant the preferred way to build log4cxx? I don't see the VS
project files any more.


On Tue, Mar 18, 2014 at 11:47 AM, Thorsten Schöning
<ts...@am-soft.de>wrote:

> Guten Tag Joseph Fradley,
> am Dienstag, 18. März 2014 um 15:17 schrieben Sie:
>
> >
> http://www.codeproject.com/Tips/492585/How-to-build-log4cxx-with-Visual-Studio-2010
>
> The code changes should no longer be necessary if you use trunk, we
> had some bugs for those changes and already applied them. though I
> don't know the numbers anymore.
> Mit freundlichen Grüßen,
>
> Thorsten Schöning
>
> --
> Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
> AM-SoFT IT-Systeme      http://www.AM-SoFT.de/
>
> Telefon...........05151-  9468- 55
> Fax...............05151-  9468- 88
> Mobil..............0178-8 9468- 04
>
> AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
> AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow
>
>

Re: Status of log4cxx under Windows using VS 2010

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag Joseph Fradley,
am Dienstag, 18. März 2014 um 15:17 schrieben Sie:

> http://www.codeproject.com/Tips/492585/How-to-build-log4cxx-with-Visual-Studio-2010

The code changes should no longer be necessary if you use trunk, we
had some bugs for those changes and already applied them. though I
don't know the numbers anymore.
Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: Status of log4cxx under Windows using VS 2010

Posted by Joseph Fradley <jo...@fradeng.com>.
I hit another roadblock. I'm trying to create an AsyncAppender with a
ConsoleAppender attached (programatically for now). Once I call
logger->addAppender(asyncAppender) I get an access violation exception:

"Unhandled exception at 0x0fd39f81 (log4cxx.dll) in ..."

My code looks like this:
defaultLayout = new log4cxx::SimpleLayout();
asyncAppender = new log4cxx::AsyncAppender();
consoleAppender = new log4cxx::ConsoleAppender(defaultLayout);
asyncAppender->addAppender(consoleAppender);
logger->addAppender(asyncAppender);   // crashes here


The exception occurs here in log4cxx:

void AsyncAppender::addRef() const {
    ObjectImpl::addRef();  // crashes here
}



Now I'm worried the work around instructions I used to compile log4cxx
under VS 2010 might have messed something up. It works if I just use the
ConsoleAppender.

Does anybody have any experience using the AsyncAppender? Am I missing a
step?

Thank you for any help. I'm probably going to have to punt using log4cxx
now.

Joe



On Tue, Mar 18, 2014 at 10:17 AM, Joseph Fradley <jo...@fradeng.com>wrote:

> Hello,
>
> FWIW, this guy had the best HOW-TO to compile log4cxx on Windows using VS
> 2010.
>
>
> http://www.codeproject.com/Tips/492585/How-to-build-log4cxx-with-Visual-Studio-2010
>
> I'm going to be evaluating with my C/C++ app. Is there any known show
> stoppers that I should know about (under Windows with VS 2010)?
>
> Thank you,
> Joe
>
>
>