logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zettai Muri <zettaim...@gmail.com>
Subject Attempting to compile example program
Date Sat, 10 Sep 2011 13:49:58 GMT
Hi All,

I am using the following environment in an attempt to compile a
logging app to get started using log4cxx:

Dev-C++ 4.9.9.2
WinXP
apache-log4cxx-0.10.0
apr-1.2.11-win32-src.zip
apr-util-1.2.10-win32-src.zip

I followed the instructions on:
http://logging.apache.org/log4cxx/building/vstudio.html and built a
log4cxx.dll file using Visual Studio 6.  It created the dll but with
over 100 warnings.

I am now trying to create a simple example program to confirm it works
and found one at: http://www.yolinux.com/TUTORIALS/Log4cxx.html

I have copied the source from here and created the file
'Log4cxxConfig.xml' using the information from the above website.

Under parameters in project options in Dev-C++ the C++ Compiler has:
-I"C:\Documents and Settings\Me\My
Documents\Programming\C++\Libs\apache-log4cxx-0.10.0\src\main\include"

Under parameters in project options in Dev-C++ the Linker has:
-lapr-1 -laprutil-1

I have put the log4cxx.dll file in the project directory, however when
I attempt to compile the program I get in the Dev-C++ Compile Log:
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Me\My
Documents\Programming\C++\Code\Log4cxx01\Makefile.win"
Executing  make...
make.exe -f "C:\Documents and Settings\Me\My
Documents\Programming\C++\Code\Log4cxx01\Makefile.win" all
g++.exe -c main.cpp -o main.o
-I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"
-I"C:/Dev-Cpp/include/c++/3.4.2/backward"
-I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"
-I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"
-I"C:\Documents and Settings\Me\My
Documents\Programming\C++\Libs\apache-log4cxx-0.10.0\src\main\include"

C:/Dev-Cpp/include/c++/3.4.2/bits/basic_ios.h: In instantiation of
`std::basic_ios<wchar_t, std::char_traits<wchar_t> >':
C:/Dev-Cpp/include/c++/3.4.2/ostream:59:   instantiated from
`std::basic_ostream<wchar_t, std::char_traits<wchar_t> >'
main.cpp:14:   instantiated from here
C:/Dev-Cpp/include/c++/3.4.2/bits/basic_ios.h:67: error: no type named
`pos_type' in `struct std::char_traits<wchar_t>'
C:/Dev-Cpp/include/c++/3.4.2/ostream: In instantiation of
`std::basic_ostream<wchar_t, std::char_traits<wchar_t> >':
main.cpp:14:   instantiated from here

C:/Dev-Cpp/include/c++/3.4.2/ostream:64: error: no type named
`pos_type' in `struct std::char_traits<wchar_t>'

C:/Dev-Cpp/include/c++/3.4.2/bits/ostream.tcc:404: error: no type
named `pos_type' in `class std::basic_ostream<wchar_t,
std::char_traits<wchar_t> >'
C:/Dev-Cpp/include/c++/3.4.2/bits/ostream.tcc:420: error: no type
named `pos_type' in `struct std::char_traits<wchar_t>'

make.exe: *** [main.o] Error 1

Execution terminated

Line 14 of main.cpp is:

12 void functionA()
13 {
14     LOG4CXX_INFO(loggerFunctionA, "Executing functionA.");
15 }

Is anyone able to point me towards a way I can verify the dll is
working and creating a simple logging app to get started using this?

Many thanks,

ZM.

Mime
View raw message