我在编译Share_memory的时候,遇要这个问题了。
[root@localhost Shared_Memory]# pwd
/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory
[root@localhost Shared_Memory]# make
make[1]: Entering directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
GNUmakefile: /home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory/GNUmakefile.Malloc MAKEFLAGS=w
make[1]: Leaving directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
make[1]: Entering directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
GNUmakefile: /home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory/GNUmakefile.Mem_Map MAKEFLAGS=w
make[1]: Leaving directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
make[1]: Entering directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
GNUmakefile: /home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory/GNUmakefile.PI_Malloc MAKEFLAGS=w
g++ -fvisibility=hidden -fvisibility-inlines-hidden -W -Wall -Wpointer-arith -O3 -g -pipe -pipe -D_GNU_SOURCE -DACE_HAS_LINUX_NPTL -D_REENTRANT -DACE_HAS_AIO_CALLS -D_GNU_SOURCE -I/home/cyliu/project/src/ACE_wrappers -DACE_HAS_EXCEPTIONS -D__ACE_INLINE__ -I../../.. -Wl,-E -L/home/cyliu/project/src/ACE_wrappers/ace -L./ -L/home/cyliu/project/src/ACE_wrappers/lib -L. -L../../../lib -o PI_Malloc .obj/PI_Malloc.o -lACE -lposix-aio -ldl -lpthread -lrt
.obj/PI_Malloc.o: In function `ACE_Based_Pointer_Basic':
/home/cyliu/project/src/ACE_wrappers/ace/Based_Pointer_T.cpp:64: undefined reference to `ACE_Singleton<ACE_Based_Pointer_Repository, ACE_RW_Thread_Mutex>::instance()'
collect2: ld 返回 1
make[1]: *** [PI_Malloc] 错误 1
make[1]: Leaving directory `/home/cyliu/project/src/ACE_wrappers/examples/APG/Shared_Memory'
make: *** [PI_Malloc] 错误 2
[root@localhost Shared_Memory]#
为什么呢?怎么解决呢?

最新回复