【问题标题】:Errors while building ACE program构建 ACE 程序时出错
【发布时间】:2010-06-02 06:28:54
【问题描述】:

我刚开始使用“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;
}

错误:

/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 个退出状态
编译失败。

【问题讨论】:

    标签: ace


    【解决方案1】:

    没有看到构建命令很难判断,但看起来您没有添加对 ACE 库的链接时引用。

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 2012-04-22
        • 2018-04-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-02
        相关资源
        最近更新 更多