2010-06-02 11 views
-1

방금 ​​"HELLO WORLD"프로그램을 사용하여 ACE를 시작했습니다. 그것은 성공적으로 컴파일되지만 그것을 구축하는 동안 오류를 생성합니다. 누구든지 나를 도울 수 있습니다. CODE :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: In function `main': hello.cpp:(.text+0xa): undefined reference to `ACE_Log_Msg::last_error_adapter()'
hello.cpp:(.text+0x13): undefined reference to `ACE_Log_Msg::instance()'
hello.cpp:(.text+0x43): undefined reference to `ACE_Log_Msg::conditional_set(char const*, int, int, int)'
hello.cpp:(.text+0x5f): undefined reference to `ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
collect2: ld returned 1 exit status
Compilation failed.

답변

0

빌드를 보지 않고는 말할 어렵다 명령하지만 당신은 ACE 라이브러리에 링크 시간 기준을 추가하지 않은 것 같습니다.

0

이 기능이 작동하지 않도록하기 위해 수행 한 작업을 말하기는 어렵습니다. 짐작할 수 있듯이, makefile에서 포함 경로를 업데이트했지만 libACE.so를 프로젝트에 링크하는 것을 잊어 버린 것처럼 보입니다. 이로 인해 사용자가보고있는 정의되지 않은 컴파일 동작이 발생합니다.

관련 문제