<!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=812470022-07122007><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=812470022-07122007><FONT face=Arial color=#0000ff size=2>Try 
putting this new code in ACE itself. Figuring out the services stuff is not easy 
the first time around - if you need more in-depth help to get this working, 
please consider using our services to get it completed 
quickly.</FONT></SPAN></DIV>
<DIV><SPAN class=812470022-07122007><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=812470022-07122007><FONT face=Arial color=#0000ff size=2>Best 
regards,</FONT></SPAN></DIV>
<DIV><SPAN class=812470022-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 3:36 
  PM<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>
  <DI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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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&amp;ACE_SVC_NAME(Logger),</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; 
  ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,</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; 
  0)</DIV>
  <DIV>ACE_STATIC_SVC_REQUIRE(Logger_Descriptor)</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>all of the above micros are in file scope.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>before call open(...), I add </DIV>
  <DIV>ACE_STATIC_SVC_REGISTER(Logger_Descriptor)</DIV>
  <DIV>this micro is within class scope</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>when I build my static lib, I set </DIV>
  <DIV>enable-static=yes</DIV>
  <DIV>enable-shared=no</DIV>
  <DIV>enable-lib-all=yes</DIV>
  <DIV>enable-lib-logging=yes</DIV>
  <DIV>enable-logging=yes.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>when I compile my application, the following errors appear in 
order:</DIV>
  <DIV>In function 'ACE_Service_Object * _make_Logger(..)</DIV>
  <DIV>error: expected type-specifier before 'Logger'</DIV>
  <DIV>error: cannot convert 'int *' to 'ACE_Service_Object *' in return </DIV>
  <DIV>error: expected ';'before 'Logger'</DIV>
  <DIV>error: 'Logger' was not declared in this scope</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>It looks like I&nbsp;did not&nbsp;add Logger into the lib, I took a look 
  at the configure file and no parameter is related to Logger directly.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>could you give me more information about it.</DIV>
  <DIV>thank you very much.</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Richard</DIV>
  <DIV>&nbsp;</DIV>
  <DIV><BR><BR><B><I>Steve Huston &lt;shuston@riverace.com&gt;</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=595205517-07122007><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=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>&nbsp;</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>&nbsp;</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 -->
    <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> 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>&nbsp;</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&nbsp;put Logger after 
      dynamic. do you think i need to&nbsp;write a class called Logger when I 
      use static ACE lib.</DIV>
      <DIV>&nbsp;</DIV>
      <DIV>thanks</DIV>
      <DIV>Richard<BR><BR><B><I>Steve Huston 
      &lt;shuston@riverace.com&gt;</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>&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 -->
        <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:&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>in the application file , I use the code segment:</DIV>
          <DIV>if (ACE_Service_Config::open(argc,</DIV>
          <DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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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>
          <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>
      <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>
  Be a better friend, newshound, and know-it-all with Yahoo! Mobile. <A 
  href="http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ ">Try 
  it now.</A></BLOCKQUOTE></BODY></HTML>