<!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=356090223-06122007><FONT face=Arial color=#0000ff size=2>Hi 
Richard,</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</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>&nbsp;</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 -->
<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> 
  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:&nbsp; Intel PC,&nbsp;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&nbsp;file is like the following.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>dynamic Logger Service_Object * ACE:_make_ACE_Logging_Strategy() "-s 
  log.out -f STDERR|OSTREAM - INFO"</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  0,</DIV>
  <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  1) &lt; 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>&nbsp;</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>&nbsp;</DIV>
  <DIV>I guess it is because no shared lib so I change the configuration file to 
  the following.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>static Logger "-s log.out -f STDERR|OSTREAM -p INFO"</DIV>
  <DIV>&nbsp;</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>&nbsp;</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>&nbsp;</DIV>
  <DIV>Richard</DIV>
  <DIV>&nbsp;</DIV>
  <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>