问题描述
我正在Cray上编译一个名为MICO的CORBA ORB的最新版本
X1。它大量使用模板和命名空间。
直到链接步骤,C ++源代码编译完美无瑕。但是,
当它试图链接时,我收到了附加的警告,然后是错误。
为什么链接器看不到库中的对象的任何想法?他们
看起来很漂亮的名字,
所以也许有某种类型的符号长度或错位问题
on?被破坏的名称出现在。中。文件也是。
任何人在Cray上链接类似的C ++代码都有类似的问题吗?
我不是专业的C ++程序员,但我有很多坚韧和
能量。 :-)
所以,如果你有任何想法我可以尝试,无论多么模糊,请
让我知道。
CC -I。 -I ../ idl -I ../包括-O2 -L。 -L ../ idl -L ../ orb main.o -L。
-lidl -lmicoir2.3.11 -lmico2.3.11 -ldl -lelf -lm -o ird
ld-400 ld:警告
未解决的文字符号
" release__34ObjVar__tm__20_Q2_5CORBA9StringDefSFPZ 1Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
未解决的文字符号
" release__36ObjVar__tm__22_Q2_5CORBA10WstringDefSF PZ1Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
未解决的文本符号
" release__37ObjVar__tm__23_Q2_5CORBA11SequenceDefS FPZ1Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
未解决的文字符号
" release__33ObjVar__tm__19_Q2_5CORBA8FixedDefSFPZ1 Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
未解决的文字符号
" release__33ObjVar__tm__19_Q2_5CORBA8ArrayDefSFPZ1 Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
未解决的文本符号
" release__38ObjVar__tm__24_Q2_5CORBA12PrimitiveDef SFPZ1Z_v" - 首先
在../ idl / libidl.a:db.o中引用。
ld-400 ld:警告
....
未解决的文字符号
" release__59ObjVar__tm__45_Q2_14PortableServer23Re questProcessingPolicySFPZ1Z_v"
- 首先在
中引用" ../ orb / libmico2.3.11.a:poa_impl.o"。
ld-400 ld:警告
未解决的文字符号
" release__50ObjVar__tm__36_Q2_14PortableServer14Se rvantManagerSFPZ1Z_v"
- 首先在
" ../ orb / libmico2.3.11.a:poa_impl.o"中引用。
ld-400 ld:警告
未解决的文字符号
" release__52ObjVar__tm__38_Q2_14PortableServer16Ad apterActivatorSFPZ1Z_v"
- 首先在
中引用
" ../ orb / libmico2.3.11.a:poa_impl.o"。
ld-401 ld:ERROR
未解决的文字符号。加载终止。
I''m compiling the latest version of a CORBA ORB called MICO on a Cray
X1. It makes heavy use of templates and namespaces.
Up until the link step, the C++ source code compiled flawlessly. But,
when it tried to link, I got the attached warnings and then an error.
Any ideas why the linker wouldn''t see the objects in the library? They
look like pretty long names,
so maybe there is some type of symbol length or mangling issue going
on? The mangled names appear in the ".ti" files as well.
Anybody have similar problems with linking similar C++ code on the Cray?
I''m not an expert C++ programmer, but I have a lot of tenacity and
energy. :-)
So if you have any ideas I can try out no matter how obscure, please
let me know.
CC -I. -I../idl -I../include -O2 -L. -L../idl -L../orb main.o -L.
-lidl -lmicoir2.3.11 -lmico2.3.11 -ldl -lelf -lm -o ird
ld-400 ld: WARNING
Unresolved text symbol
"release__34ObjVar__tm__20_Q2_5CORBA9StringDefSFPZ 1Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__36ObjVar__tm__22_Q2_5CORBA10WstringDefSF PZ1Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__37ObjVar__tm__23_Q2_5CORBA11SequenceDefS FPZ1Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__33ObjVar__tm__19_Q2_5CORBA8FixedDefSFPZ1 Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__33ObjVar__tm__19_Q2_5CORBA8ArrayDefSFPZ1 Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__38ObjVar__tm__24_Q2_5CORBA12PrimitiveDef SFPZ1Z_v" -- First
referenced in "../idl/libidl.a:db.o".
ld-400 ld: WARNING
....
Unresolved text symbol
"release__59ObjVar__tm__45_Q2_14PortableServer23Re questProcessingPolicySFPZ1Z_v"
-- First referenced in
"../orb/libmico2.3.11.a:poa_impl.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__50ObjVar__tm__36_Q2_14PortableServer14Se rvantManagerSFPZ1Z_v"
-- First referenced in
"../orb/libmico2.3.11.a:poa_impl.o".
ld-400 ld: WARNING
Unresolved text symbol
"release__52ObjVar__tm__38_Q2_14PortableServer16Ad apterActivatorSFPZ1Z_v"
-- First referenced in
"../orb/libmico2.3.11.a:poa_impl.o".
ld-401 ld: ERROR
Unresolved text symbol(s). Loading terminated.
推荐答案
常见问题解答可能帮助,34.12到34.15
http://www.parashift.com/c++-faq-lit...templates.html
john
The FAQ might help, 34.12 to 34.15
http://www.parashift.com/c++-faq-lit...templates.html
john
常见问题解答可能帮助,34.12到34.15
http://www.parashift.com/c++-faq-lit...templates.html
john
The FAQ might help, 34.12 to 34.15
http://www.parashift.com/c++-faq-lit...templates.html
john
约翰,
感谢您提供常见问题解答链接。那里有很多很棒的信息
。我阅读了34.12和34.5并仔细查看了MICO源代码
代码。似乎开发人员尽职尽责地定义了包含文件中的所有模板,因此链接器应该能够分辨出要执行的操作
。在IRIX上使用g ++ 3.3(使用SGI的
链接器),Solaris和Linux编译代码。据我所知,Cray目前还没有移植g ++
。我想知道编译器或链接器中是否有错误?
除了bug之外还有其他错误吗?
谢谢,
Rob
Hi John,
Thanks for the link to the FAQ. There is a lot of great information
there. I read over the 34.12 and 34.5 and looked through the MICO source
code a bit more. It appears that the developers dutifully defined all of
the templates in include files so the linker should be able to tell what
to do. The code compiles fine with g++ 3.3 on IRIX (using the SGI''s
linker), Solaris and Linux. The Cray doesn''t have g++ ported yet as far
as I know. I wonder if there is a bug in the compiler or the linker?
Could there be something else wrong besides a bug?
Thanks,
Rob
这篇关于在Cray X1上链接C ++代码的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!