473,385 Members | 1,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Logger Example

Hi

I have downloaded install ACE 5.6.6

Installation Step

01] cd /usr/src/ACE_wrappers
02] mkdir objdir
03] cd objdir
04] ../configure
05] make && make install
06] export ACE_ROOT=/usr/src/ACE_wrappers
07] export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ACE_ROOT/ace
08] cd /usr/src/ACE_wrappers/ace
09] ln-s config-linux.h config.h
10] ln -s platform_linux.GNU platform_macros.GNU ln-s
platform_linux.GNU platform_macros.GNU

Then I have return simple program.. named "client.cpp"

#include "/usr/src/ACE_wrappers/ace/Log_Msg.h"

void foo(void);

int ACE_TMAIN (int, ACE_TCHAR *[])
{
ACE_TRACE (ACE_TEXT ("main"));
ACE_LOG_MSG->priority_mask (LM_DEBUG | LM_NOTICE,
ACE_Log_Msg::PROCESS);

ACE_DEBUG ((LM_INFO, ACE_TEXT ("%IHi Mom\n")));
foo ();
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%IGoodnight\n")));

return 0;
}

void foo(void)
{
ACE_TRACE (ACE_TEXT ("foo"));
ACE_DEBUG ((LM_NOTICE, ACE_TEXT ("%IHowdy Pardner\n")));
}
================================================== ==============================
Makefile for client.cpp

BIN = client
BUILD = $(VBIN)
SRC = $(addsuffix .cpp,$(BIN))
VLDLIBS = $(LDLIBS:%=%$(VAR))

#----------------------------------------------------------------------------
# Include macros and targets
#----------------------------------------------------------------------------

include $(ACE_ROOT)/include/makeinclude/wrapper_macros.GNU
include $(ACE_ROOT)/include/makeinclude/macros.GNU
include $(ACE_ROOT)/include/makeinclude/rules.common.GNU
include $(ACE_ROOT)/include/makeinclude/rules.nonested.GNU
include $(ACE_ROOT)/include/makeinclude/rules.bin.GNU
include $(ACE_ROOT)/include/makeinclude/rules.local.GNU
================================================== ==============================

After all I have fire the make / make client command from terminal it
gives me error like

GNUmakefile: /usr/src/ACE_wrappers/MYProg/GNUmakefile MAKEFLAGS=

g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall -Wpointer-
arith -O3 -ggdb -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS -
D_GNU_SOURCE -I/usr/src/ACE_wrappers -DACE_HAS_EXCEPTIONS -
D__ACE_INLINE__ -c -o .obj/client.o client.cpp
g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall -Wpointer-
arith -O3 -ggdb -pipe -D_REENTRANT -DACE_HAS_AIO_CALLS -
D_GNU_SOURCE -I/usr/src/ACE_wrappers -DACE_HAS_EXCEPTIONS -
D__ACE_INLINE__ -Wl,-E -L/usr/src/ACE_wrappers/ace -L./ -L/usr/src/
ACE_wrappers/lib -o client .obj/client.o -ldl -lpthread -lrt
..obj/client.o: In function `foo':
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::last_error_adapter()'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::instance()'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::conditional_set(char const*, int, int, int)'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
..obj/client.o: In function `main':
/usr/src/ACE_wrappers/MYProg/client.cpp:9: undefined reference to
`ACE_Log_Msg::instance()'
/usr/src/ACE_wrappers/MYProg/client.cpp:9: undefined reference to
`ACE_Log_Msg::priority_mask(unsigned long, ACE_Log_Msg::MASK_TYPE)'
/usr/src/ACE_wrappers/MYProg/client.cpp:11: undefined reference to
`ACE_Log_Msg::last_error_adapter()'
/usr/src/ACE_wrappers/MYProg/client.cpp:11: undefined reference to
`ACE_Log_Msg::instance()'
/usr/src/ACE_wrappers/MYProg/client.cpp:11: undefined reference to
`ACE_Log_Msg::conditional_set(char const*, int, int, int)'
/usr/src/ACE_wrappers/MYProg/client.cpp:11: undefined reference to
`ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
..obj/client.o: In function `foo':
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::last_error_adapter()'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::instance()'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::conditional_set(char const*, int, int, int)'
/usr/src/ACE_wrappers/MYProg/client.cpp:21: undefined reference to
`ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
..obj/client.o: In function `main':
/usr/src/ACE_wrappers/MYProg/client.cpp:13: undefined reference to
`ACE_Log_Msg::last_error_adapter()'
/usr/src/ACE_wrappers/MYProg/client.cpp:13: undefined reference to
`ACE_Log_Msg::instance()'
/usr/src/ACE_wrappers/MYProg/client.cpp:13: undefined reference to
`ACE_Log_Msg::conditional_set(char const*, int, int, int)'
/usr/src/ACE_wrappers/MYProg/client.cpp:13: undefined reference to
`ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
I am unable to predict the error..

help me out from above problem.

Thanks
Sep 20 '08 #1
0 1437

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Laszlo | last post by:
Hi I need a GL::Logger wich implements Class::Singleton to be a singleton and Log::Log4perl to can log amy message into a file. Here is the module source:...
1
by: rodsatt | last post by:
Hi, This is my first post, and I got questions about logging. When something happen within an object, and if I would like to log the event, what would be a good way to do it? 1. I make the...
10
by: Gary Jefferson | last post by:
Suppose I have 3 modules that belong to a project, 'A', 'A.a' and 'B', and each module has its own logger, created with: module1logger = logging.getLogger('project.A') and module2logger =...
5
by: CedricCicada | last post by:
Greetings! I want to write messages into the Windows event log. I found sevicemanager, but the source is always "Python Service", and I'd like to be a bit more descriptive. Poking around on...
4
by: garyjefferson123 | last post by:
Suppose I have some sort of context variable that I want to appear in log messages. E.g.: logger = logging.getLogger("somelogger") class SomeOp: def __init__(self, ctx): self.ctx = ctx def...
1
by: Christopher Pisz | last post by:
I set out to make a custom logger. Examining some other code laying around, I came across one that derived from ostream, and had a associated class derived from streambuf. Is this practice a good...
4
by: skunkwerk | last post by:
i'm redirecting the stdout & stderr of my python program to a log. Tests i've done on a simple program with print statements, etc. work fine. however, in my actual program i get weird output like...
0
by: Dr. Colombes | last post by:
I've used a very nice Keystroke Logger Python shareware program (EVDEV.py), written by Micah Dowty. But I couldn't find a dedicated ASCII Character Logger program. Does anyone know of an ASCII...
1
by: nagk9 | last post by:
Hi , I am using log4j in my application. I have the problem with log4j.properties file . It will automatically appends another logger file from the current logger which i am using for the...
1
by: Matimus | last post by:
Yes but in the other hand :http://docs.python.org/library/logging.html#logger-objects That is part of the power of the logging module. If you ask for a logger of the same name in two different...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.