ACE 6.1.2 编译问题

一段简单的测试代码

#include 
#include "ace/Log_Msg.h"
#include "ace/OS_main.h"

int main0() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}


int ACE_TMAIN(int arg,ACE_TCHAR *argv[])
{
	ACE_DEBUG( (LM_DEBUG,ACE_TEXT("Hello\n")));
	return 0;
}

在FC16 ACE6.0.2编译通过,但升级到6.1.2就编译失败了,似乎此版本有问题


Building target: Test
Invoking: GCC C++ Linker
g++  -o "Test"  ./src/Test.o   -lACE
./src/Test.o: In function `main':
/home/flyspace/workspace/Test/Debug/../src/Test.cpp:24: undefined reference to `ACE_Log_Msg::last_error_adapter()'
/home/flyspace/workspace/Test/Debug/../src/Test.cpp:24: undefined reference to `ACE_Log_Msg::instance()'
/home/flyspace/workspace/Test/Debug/../src/Test.cpp:24: undefined reference to `ACE_Log_Msg::conditional_set(char const*, int, int, int)'
/home/flyspace/workspace/Test/Debug/../src/Test.cpp:24: undefined reference to `ACE_Log_Msg::log(ACE_Log_Priority, char const*, ...)'
collect2: ld 返回 1
make: *** [Test] 错误 1


降级到版本6.1.0 再次编译 通过!

由此确认6.1.2版本确实有问题!

真晕,折腾了我一天时间!



你可能感兴趣的:(C++,Linux)