[Ace-users] using the build scheme
Saya
bsayanthan at gmail.com
Wed Dec 12 03:03:13 CST 2007
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
More information about the Ace-users
mailing list