贝贝花花包包店,精品555皮具,钱夹,皮夹

字体:  

undefined reference to `ACE_Singleton<xxx>::instance()'

jonathanliu2004 发表于: 2008-6-16 20:39 来源: ACE 开发者

我在编译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]#


为什么呢?怎么解决呢?

最新回复

winston at 2008-6-17 12:00:57
好像这个Shared_Memory需要打开编译宏,你看看头文件。
jonathanliu2004 at 2008-6-19 10:45:14
哪个头文件能够控制呢?找了半天还是一头露水阿。版主在进一步给个点拨