On Jun 26, 2006, at 12:58 PM, venkatlakshmi wrote:

I tried compiling the NTEventLog.cpp to retrieve the
NTEventLog.dll. When I compiled the NTEventlog.cpp
from the respective path, it shows the following
error.



..

Kindly let me know as to how I am supposed to proceed
with.


With regards,

Venkatlakshmi


The build.xml in the SVN for both the log4j 1.2 and 1.3 branches will build NTEventLogAppender.dll using MinGW's gcc (see bug 37866, http:// issues.apache.org/bugzilla/show_bug.cgi?id=37866). Unless you have a specific need to use Borland C++, I would recommend using the Ant build. The specific cause of your compilation issues is that the code requires header files generated by javah to be on the include path.

To build NTEventLogAppender.dll:

1. Download MinGW-3.1.0-1.exe from http://mingw.sourceforge.net/ download.shtml

2. Run downloaded file to install MinGW

3. Check out log4j source from Subversion

svn co http:://svn.apache.org/repos/asf/logging/trunk/log4j/trunk log4j

or

svn co http:://svn.apache.org/repos/asf/logging/log4j/branches/v1_2- branch log4j

4. Copy build.properties.sample to build.properties

cd log4j
copy build.properties.sample build.properties

5. Place MinGW on the path

path c:\mingw\bin;%PATH%

6. Build NTEventLogAppender

ant build.nt

This step will require that you build log4j.jar first which may require downloading some supporting jars and modifying build.properties. However, if you are already set up to build log4j, then you should know your way around these issues.

If you really want to use Borland C++, then you can look at the build.nt target in build.xml for the step by step. You'd want to use the Borland Resource Compiler (brc or brc32 if I remember correctly) or Microsoft Resource Compiler (rc) instead of windres to compile EventLogCategories.rc and NTEventLogAppender.rc and Borland C++ (bcc32) instead of gcc to compile nteventlog.cpp.

If you don't care about building the DLL, you can extract it from any older log4j (say 1.2.8) from http://archive.apache.org/dist.





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to