[Ace-users] [ace-users] using the build scheme

Finer, Howard hfiner at sonusnet.com
Wed Dec 12 08:03:23 CST 2007


Due to MPC related changes in 5.6, libACE is no longer automatically
linked in.  The makefile must have an explicit -lACE to be linked
against it.

I had a similar issue that I had worked on with Riverace, and this was
Steve's response:
This change was made to ACE to better support MPC-generated makefiles.
Unfortunately, it was not called out as a user-visible change by the
author. I apologize for this confusion.
Unlike the __prebuild__ issue, there's no way to easily re-add this
without causing issues with all current makefiles. The only way to
resolve this is to explicitly add -lACE to your LDLIBS variables where
needed, or regenerate your makefiles with MPC.

Howard

-----Original Message-----
From: ace-users-bounces at cse.wustl.edu
[mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Steve Huston
Sent: Wednesday, December 12, 2007 8:26 AM
To: 'Johnny Willemsen'; bsayanthan at gmail.com
Cc: ace-users at cs.wustl.edu
Subject: Re: [ace-users] using the build scheme

Hi Sayanthan,

Johnny's advice to look at MPC is good. However, you can also use the
Makefile included with the book's examples. In this case, look in
ACE_wrappers/examples/APG/Logging. The example you've included below
looks a lot like Simple1.cpp

Best regards,
-Steve

--
Steve Huston, Riverace Corporation
Want to take ACE training on YOUR schedule?
See http://www.riverace.com/training.htm


> -----Original Message-----
> From: ace-users-bounces at cse.wustl.edu 
> [mailto:ace-users-bounces at cse.wustl.edu] On Behalf Of Johnny
Willemsen
> Sent: Wednesday, December 12, 2007 4:15 AM
> To: bsayanthan at gmail.com
> Cc: ace-users at cs.wustl.edu
> Subject: Re: [ace-users] using the build scheme
> 
> 
> Hi,
> 
> It seems the ACE lib isn't linked into the application. I 
> would recommend
> you to have a look at MPC, that is part of the distribution 
> and we generate
> now our makefiles, much easier to maintain and use.
> 
> Regards,
> 
> Johnny Willemsen
> Remedy IT
> Postbus 101
> 2650 AC  Berkel en Rodenrijs
> The Netherlands
> www.theaceorb.nl / www.remedy.nl  
> 
> *** Integrated compile and test statistics see
> http://scoreboard.theaceorb.nl ***
> *** Commercial service and support for ACE/TAO/CIAO             ***
> *** See http://www.theaceorb.nl/en/support.html                 ***
> 
> "Saya" <bsayanthan at gmail.com> wrote in message
> news:<5ac4b6dc-d3c1-4f9b-a962-828adec70917 at d27g2000prf.googleg
> roups.com>...
> > Hi all,
> > 
> > I am new to ACE and I tried to write a simple program from ACE
> > programmers guide, which would use the build scheme 
> provided with the
> > ACE framework and with the following makefile
> > 
> > BIN = test
> > FILES = Foo
> > SRC= $(addsuffix .cpp,$(FILES))
> > OBJ= $(addsuffix .o,$(FILES))
> > BUILD   = $(VBIN)
> > #---------------------------------------------------------
> > # 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
> > 
> > 
> > and the following simple program - Foo.cpp
> > 
> > #include "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")));
> > }
> > 
> > I got the following error when trying to make all
> > 
> > .obj/Foo.o: In function `foo':
> > /home/saya/workspace/ace_make/Foo.cpp:16: undefined reference to
> > `ACE_Log_Msg::last_error_adapter()'
> > 
> > (there were a few similar errors)
> > 
> > Anyhow when I wrote my own makefile the program worked.
> > 
> > Can anyone advise me on using the build scheme? Is it is 
> better to use
> > this build scheme or is it better to have our own makefiles in the
> > program.
> > 
> > Thank you,
> > 
> > Sayanthan
> 
> _______________________________________________
> ace-users mailing list
> ace-users at mail.cse.wustl.edu
> http://mail.cse.wustl.edu/mailman/listinfo/ace-users
> 


_______________________________________________
ace-users mailing list
ace-users at mail.cse.wustl.edu
http://mail.cse.wustl.edu/mailman/listinfo/ace-users



More information about the Ace-users mailing list