|
系统为:redhat
编译命令为: g++ -g -Wall -I $ACE_ROOT hello.cpp
出现的错误信息为:
- /tmp/cck4BAzE.o(.text+0x1d): In function `main':
- /home/godpig/Desktop/work/ace/hello.cpp:7: undefined reference to `ACE_Log_Msg::last_error_adapter()'
- /tmp/cck4BAzE.o(.text+0x25):/home/godpig/Desktop/work/ace/hello.cpp:7: undefined reference to `ACE_Log_Msg::instance()'
- /tmp/cck4BAzE.o(.text+0x3f):/home/godpig/Desktop/work/ace/hello.cpp:7: undefined reference to `ACE_Log_Msg::conditional_set(char const*, int, int, int)'
- /tmp/cck4BAzE.o(.text+0x54):/home/godpig/Desktop/work/ace/hello.cpp:7: undefined reference to `ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
- collect2: ld returned 1 exit status
复制代码
hello.cpp的代码为:- #include <stdio.h>
- #include "ace/Log_Msg.h"
- #include "ace/OS_main.h"
- int ACE_TMAIN(int argc, ACE_TCHAR *argv[])
- {
- ACE_DEBUG((LM_DEBUG, "Hello World\n"));
- return 0;
- }
复制代码
我初学,从网上找了个最简单的例子,但一编译就出现了这样的问题,不知道是什么原因造成的?
非常感谢!!!
|
|