当前位置: 技术问答>linux和unix
linux下编译ACE时链接出错,请大侠们帮忙参谋一下,到底是什么原因引起的,谢谢!
来源: 互联网 发布时间:2016-02-18
本文导语: ../configure --with-tao=no --enable-ace-examples=no --enable-ace-tests=no --prefix=/home/blackcat/ACE_wrappers/obj/ 上面是我的配置选项,应该是没有问题的,编译过程也正常,但是到后面连接的时候就报错,也不知道为什么,请大侠帮忙指...
../configure --with-tao=no --enable-ace-examples=no --enable-ace-tests=no --prefix=/home/blackcat/ACE_wrappers/obj/
上面是我的配置选项,应该是没有问题的,编译过程也正常,但是到后面连接的时候就报错,也不知道为什么,请大侠帮忙指点一下,谢谢;下面是错误信息
make[2]: Entering directory `/home/blackcat/ACE_wrappers/obj/apps/soreduce'
/bin/bash ../../libtool --mode=link --tag=CXX g++ -W -Wall -Wpointer-arith -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -pthread -pipe -O3 -o soreduce soreduce-Library.o soreduce-Obj_Module.o soreduce-SO_Group.o soreduce-Sig_List.o soreduce-Signature.o soreduce-soreduce.o ../../ace/libACE.la -lrt -ldl
g++ -W -Wall -Wpointer-arith -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -pipe -O3 -o .libs/soreduce soreduce-Library.o soreduce-Obj_Module.o soreduce-SO_Group.o soreduce-Sig_List.o soreduce-Signature.o soreduce-soreduce.o -pthread ../../ace/.libs/libACE.so -lrt -ldl -Wl,--rpath -Wl,/home/blackcat/ACE_wrappers/obj//lib
soreduce-Library.o: In function `Library::write_export_list(int)':
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:332: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:342: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:342: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:332: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/usr/bin/ld: .libs/soreduce: hidden symbol `std::basic_ofstream::~basic_ofstream()' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [soreduce] 错误 1
make[2]: Leaving directory `/home/blackcat/ACE_wrappers/obj/apps/soreduce'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/home/blackcat/ACE_wrappers/obj/apps'
make: *** [all-recursive] 错误 1
上面是我的配置选项,应该是没有问题的,编译过程也正常,但是到后面连接的时候就报错,也不知道为什么,请大侠帮忙指点一下,谢谢;下面是错误信息
make[2]: Entering directory `/home/blackcat/ACE_wrappers/obj/apps/soreduce'
/bin/bash ../../libtool --mode=link --tag=CXX g++ -W -Wall -Wpointer-arith -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -pthread -pipe -O3 -o soreduce soreduce-Library.o soreduce-Obj_Module.o soreduce-SO_Group.o soreduce-Sig_List.o soreduce-Signature.o soreduce-soreduce.o ../../ace/libACE.la -lrt -ldl
g++ -W -Wall -Wpointer-arith -fvisibility=hidden -fvisibility-inlines-hidden -g -O2 -pipe -O3 -o .libs/soreduce soreduce-Library.o soreduce-Obj_Module.o soreduce-SO_Group.o soreduce-Sig_List.o soreduce-Signature.o soreduce-soreduce.o -pthread ../../ace/.libs/libACE.so -lrt -ldl -Wl,--rpath -Wl,/home/blackcat/ACE_wrappers/obj//lib
soreduce-Library.o: In function `Library::write_export_list(int)':
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:332: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:342: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:342: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/home/blackcat/ACE_wrappers/obj/apps/soreduce/../../../apps/soreduce/Library.cpp:332: undefined reference to `std::basic_ofstream::~basic_ofstream()'
/usr/bin/ld: .libs/soreduce: hidden symbol `std::basic_ofstream::~basic_ofstream()' isn't defined
/usr/bin/ld: final link failed: Nonrepresentable section on output
collect2: ld returned 1 exit status
make[2]: *** [soreduce] 错误 1
make[2]: Leaving directory `/home/blackcat/ACE_wrappers/obj/apps/soreduce'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/home/blackcat/ACE_wrappers/obj/apps'
make: *** [all-recursive] 错误 1
|
检查一下环境变量设置,library路径是否正确。
|
你用ACE5.6版本就不会出错。