g++ -o Test Test.o -static -lACE 连接不上静态链接库,两台机都是这个问题,郁闷啊
Test.o:Test.cpp:(.text+0x83): undefined reference to `_imp___ZN13ACE_Main_Base3runEiPPc' Test.o:Test.cpp:(.text+0x103): undefined reference to `_imp___ZN11ACE_Log_Msg18last_error_adapterEv' Test.o:Test.cpp:(.text+0x10d): undefined reference to `_imp___ZN11ACE_Log_Msg8instanceEv' Test.o:Test.cpp:(.text+0x13c): undefined reference to `_imp___ZN11ACE_Log_Msg15conditional_setEPKciii' Test.o:Test.cpp:(.text+0x159): undefined reference to `_imp___ZN11ACE_Log_Msg3logE16ACE_Log_PriorityPKcz' Test.o:Test.cpp:(.text+0x179): undefined reference to `_imp___ZN14ACE_Time_Value4zeroE' Test.o:Test.cpp:(.text+0x192): undefined reference to `_imp___ZN14ACE_Time_Value8max_timeE' Test.o:Test.cpp:(.text$_ZN8ACE_MainD1Ev[ACE_Main::~ACE_Main()]+0x16): undefined reference to `_imp___ZN13ACE_Main_BaseD2Ev' Test.o:Test.cpp:(.text$_ZN8ACE_MainC1Ev[ACE_Main::ACE_Main()]+0xd): undefined reference to `_imp___ZN13ACE_Main_BaseC2Ev' Test.o:Test.cpp:(.text$_ZN8ACE_MainD0Ev[ACE_Main::~ACE_Main()]+0x16): undefined reference to `_imp___ZN13ACE_Main_BaseD2Ev' collect2: ld returned 1 exit status