[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Linker error on unstable amd64



Bharath Ramesh <bramesh@vt.edu> writes:

> I am trying to build CBMC which is a Bounded Model Checker for ANSI-C.
> It checks for buffer overflows, pointer safety etc. The command line
> which the make file runs is as follows:
>
> ld -r -o goto-programs.o goto_convert.o goto_function.o goto_main.o goto_sideeffects.o goto_program.o basic_blocks.o goto_threads.o goto_check.o goto_function_pointers.o goto_functions.o goto_inline.o remove_skip.o function_dependencies.o goto_convert_functions.o builtin_functions.o show_claims.o destructor.o set_claims.o slicer.o invariant_set.o invariant_propagation.o add_race_assertions.o rw_set.o read_goto_binary.o read_goto_object.o xml_goto_function.o xml_goto_program.o xml_goto_program_hashing.o xml_goto_function_hashing.o invariant_set_domain.o static_analysis.o

That is the _C_ linker.

> Thanks,
>
> Bharath
>
> * Goswin von Brederlow (brederlo@informatik.uni-tuebingen.de) wrote:
>> Bharath Ramesh <bramesh@vt.edu> writes:
>> 
>> > I am trying to compile a software. When I try to do it I get error.
>> > Which seems to be a linker error I assume. This compiles cleanly on a
>> > machine running fedora. The error I get is as follows:
>> >
>> > `.gnu.linkonce.t._ZNK22goto_program_templatetI5exprtE18output_instructionERK10namespacetRK7dstringRSoSt20_List_const_iteratorINS1_12instructiontEE' referenced in section `.rodata' of goto_functions.o: defined in discarded section `.gnu.linkonce.t._ZNK22goto_program_templatetI5exprtE18output_instructionERK10namespacetRK7dstringRSoSt20_List_const_iteratorINS1_12instructiontEE' of goto_functions.o

And those look like _C++_ symbols with the prototype signatured
mangled into the name.

>> > Any help on this is appreciated.

You have to link C++ code with the C++ compiler. Replace ld with g++
(or $(CXX) if the Makefile is halfway normal) and it should work.

MfG
        Goswin



Reply to: