<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o =
"urn:schemas-microsoft-com:office:office"><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.6000.16544" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff size=2>Hi
Richard,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2>Right... the Logger stuff is built into ACE when you build it as a shared
library. When you build static, dynamic services inside of ACE (like Logger)
won't be available. You may be able to add the static service information and
allow the logging service to work as a static service when ACE is built as a
static library.</FONT></SPAN></DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2>C++NPv2 chapter 5 describes dynamic and static services. If you need
further expertise with this project, please contact me to discuss it
further.</FONT></SPAN></DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2>Thanks,</FONT></SPAN></DIV>
<DIV><SPAN class=595205517-07122007><FONT face=Arial color=#0000ff
size=2>-Steve</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<P><FONT size=2>--<BR>Steve Huston, Riverace Corporation<BR>Want to take ACE
training on YOUR schedule?<BR>See <A
href="http://www.riverace.com/training.htm">http://www.riverace.com/training.htm</A><BR></FONT></P>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> richard zhao
[mailto:rich4tech@yahoo.com] <BR><B>Sent:</B> Friday, December 07, 2007 11:19
AM<BR><B>To:</B> Steve Huston; ace-users@cs.wustl.edu<BR><B>Subject:</B> RE:
[ace-users] question about runtime configuration with the ACELogging
Strategy<BR><BR></FONT></DIV>
<DIV>Hello, Steve,</DIV>
<DIV> </DIV>
<DIV>thank you for your response.</DIV>
<DIV>in the application by using shared ACE lib. I did not write any code and
did not define any class called Logger. I just put Logger after dynamic.
do you think i need to write a class called Logger when I use static ACE
lib.</DIV>
<DIV> </DIV>
<DIV>thanks</DIV>
<DIV>Richard<BR><BR><B><I>Steve Huston <shuston@riverace.com></I></B>
wrote:</DIV>
<BLOCKQUOTE class=replbq
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR>
<DIV><SPAN class=356090223-06122007><FONT face=Arial color=#0000ff size=2>Hi
Richard,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><SPAN class=356090223-06122007><FONT face=Arial color=#0000ff
size=2>Thanks for the PROBLEM-REPORT-FORM. I suspect you'll need to add the
static service macros to ACE to set up the static service loading info.
Please see C++NPv2 chapter 5 for details.</FONT></SPAN></DIV>
<DIV><SPAN class=356090223-06122007><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=356090223-06122007><FONT face=Arial color=#0000ff
size=2>Best regards,</FONT></SPAN></DIV>
<DIV><SPAN class=356090223-06122007><FONT face=Arial color=#0000ff
size=2>-Steve</FONT></SPAN></DIV><!-- Converted from text/plain format -->
<DIV><FONT size=2>--<BR>Steve Huston, Riverace Corporation<BR>Want to take
ACE training on YOUR schedule?<BR>See <A
href="http://www.riverace.com/training.htm">http://www.riverace.com/training.htm</A><BR></FONT></DIV>
<BLOCKQUOTE
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
ace-users-bounces@cse.wustl.edu [mailto:ace-users-bounces@cse.wustl.edu]
<B>On Behalf Of </B>richard zhao<BR><B>Sent:</B> Thursday, December 06,
2007 5:33 PM<BR><B>To:</B> ace-users@cs.wustl.edu<BR><B>Subject:</B>
[ace-users] question about runtime configuration with the ACELogging
Strategy<BR><BR></FONT></DIV>
<DIV class=MsoNormal
style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">ACE VERSION:
5.6.1</SPAN></DIV>
<DIV class=MsoNormal
style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">HOST MACHINE
and OPERATING SYSTEM: Intel PC, Linux enterprise
5.0</SPAN></DIV>
<DIV class=MsoNormal
style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"></SPAN><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial">TARGET MACHINE
and OPERATING SYSTEM: Same<o:p></o:p></SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">COMPILER
NAME AND VERSION (AND PATCHLEVEL):<BR>G++<BR
style="mso-special-character: line-break"></SPAN></DIV>
<DIV><SPAN
style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial; mso-fareast-font-family: SimSun; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA">I
am writing a application by using ACE lib.<BR
style="mso-special-character: line-break"></SPAN>I wrote a log application
by using runtime configuration with the ACE logging strategy,</DIV>
<DIV>the input configuration file is like the following.</DIV>
<DIV> </DIV>
<DIV>dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s
log.out -f STDERR|OSTREAM - INFO"</DIV>
<DIV> </DIV>
<DIV>in the application file , I use the code segment:</DIV>
<DIV>if (ACE_Service_Config::open(argc,</DIV>
<DIV>
argv,</DIV>
<DIV>
ACE_DEFAULT_LOGGER_KEY,</DIV>
<DIV>
1,</DIV>
<DIV>
0,</DIV>
<DIV>
1) < 0)</DIV>
<DIV>{</DIV>
<DIV>}</DIV>
<DIV>by this way, if I compile and link ACE to shared lib, it works well,
I can create log.out and all message output to this log file.</DIV>
<DIV> </DIV>
<DIV>however, if I compile and link ACE to static lib, this way does not
work, the log.out can not create. the error message is like the
following:</DIV>
<DIV>1 ACE(28532|2142880) LN::open_dll_ failed to open ACE. error: check
log for detail.</DIV>
<DIV>2. ACE(28532|2142880) unable to create service object for
logger.</DIV>
<DIV> </DIV>
<DIV>I guess it is because no shared lib so I change the configuration
file to the following.</DIV>
<DIV> </DIV>
<DIV>static Logger "-s log.out -f STDERR|OSTREAM -p INFO"</DIV>
<DIV> </DIV>
<DIV>then recompile and link my application which are using static ACE
lib</DIV>
<DIV>the log.out still can not be created. </DIV>
<DIV>error mesasge is :</DIV>
<DIV>SG::initialize-service Logger was not located.</DIV>
<DIV>even I change the fourth parameter of open to 0.</DIV>
<DIV> </DIV>
<DIV>could someboby tell me some solutions of how to solve this problem.
that is by using static ACE lib to create log application.</DIV>
<DIV>thanks in advance.</DIV>
<DIV> </DIV>
<DIV>Richard</DIV>
<DIV> </DIV>
<DIV>
<HR SIZE=1>
Never miss a thing. <A
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs">Make
Yahoo your homepage.</A> </DIV></BLOCKQUOTE></BLOCKQUOTE><BR>
<P>
<HR SIZE=1>
Never miss a thing. <A
href="http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs">Make Yahoo
your homepage.</A> </BLOCKQUOTE></BODY></HTML>