English 中文(简体)
请解释这一联系错误:参见第.rodata节。
原标题:Please explain this linking error: referenced in section .rodata

我是在32台SLES10机器的基础上进行的。 采用海合会3.4.2

此处为样本错误

`.L8245  referenced in section `.rodata  of CMakeFiles/myproj.dir/c++/util/MyObj.o: defined in discarded section
 `.gnu.linkonce.t._ZN5boost9re_detail9reg_grep2INS0_21grep_search_predicateIPKcSaIcEEES4_cNS_12regex_traitsIcEES5_S5_EEjT_T0_SA_RKNS_14reg_expressionIT1_T2_T3_EEjT4_  of CMakeFiles/myproj.dir/c++/util/MyObj.o
最佳回答

这主要是因为有2种不同的配方,有不同的编篡人开关,但也使用相同的模板。 生成的模板即时,其定义/参考内容可能有所不同,如果所选择的瞬时状态没有界定/参照与被抛弃的标志相同的准确符号,则可能产生这一错误。

正式确定,所有贵卷的编辑都是用相同的编辑开关和界定的。 如果有可能,将联系人指挥线上的档案重新排序,特别是试图将错误信息中提到的文件移至档案清单的末尾或开始。

EDIT:

另外,如果你与预设的C++图书馆重新连接,看看你是否可以重复用于建造这些图书馆的汇编器开关。

问题回答

这可能是由于使用较新的双用途。 两版2.15版将这一错误视为非致命错误,但后来的双用法版本发生了变化,因此该链接开始失败。 见。 类似报告。

就我而言,我得以通过明确使用2.16.1的双用法而不是2.17,再次把事情联系起来。





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签