构建ACE程序时出错

时间:2010-06-02 06:28:54

标签: ace

我刚开始使用“HELLO WORLD”计划启动ACE。它成功编译,但在构建它时会产生一些错误。任何人都可以帮助我。 代码:

#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;
}

ERROR:

  

/tmp/cccwdbA0.o:在函数`main'中:   hello.cpp :(。text + 0xa):未定义引用`ACE_Log_Msg :: last_error_adapter()'
  hello.cpp :(。text + 0x13):未定义的引用`ACE_Log_Msg :: instance()'
  hello.cpp :(。text + 0x43):未定义引用`ACE_Log_Msg :: conditional_set(char const *,int,int,int)'
  hello.cpp :(。text + 0x5f):未定义引用`ACE_Log_Msg :: log(ACE_Log_Priority,char const *,...)'
  collect2:ld返回1退出状态
  编译失败。

2 个答案:

答案 0 :(得分:0)

如果没有看到构建命令,很难说,但看起来你没有为ACE库添加链接时引用。

答案 1 :(得分:0)

很难说你做了什么让这不起作用。如果我猜测,看起来好像你已经在makefile中更新了包含路径但忘记将libACE.so链接到你的项目。这将导致您看到未定义的编译行为。

相关问题