找回密码
 用户注册

QQ登录

只需一步,快速开始

查看: 3888|回复: 2

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

[复制链接]
发表于 2008-6-16 20:39:21 | 显示全部楼层 |阅读模式
我在编译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]#


为什么呢?怎么解决呢?
发表于 2008-6-17 12:00:57 | 显示全部楼层
好像这个Shared_Memory需要打开编译宏,你看看头文件。
 楼主| 发表于 2008-6-19 10:45:14 | 显示全部楼层
哪个头文件能够控制呢?找了半天还是一头露水阿。版主在进一步给个点拨
您需要登录后才可以回帖 登录 | 用户注册

本版积分规则

Archiver|手机版|小黑屋|ACE Developer ( 京ICP备06055248号 )

GMT+8, 2024-11-22 23:48 , Processed in 0.014143 second(s), 6 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表