alexD
alexD

Reputation: 2364

Runtime c++ "undefined symbol" exception

I am getting an undefined symbol exception for a method that is actually executing. This makes no sense to me. Here is an example of the log:

/src/CustomerReturnProcessUtils/labelPrintUtils/CreturnLabelPrinter.cpp:402 (null)(): CreturnLabelPrinter: [InitializeZebraPrint] Success connecting to socket /apollo/env/CustomerReturnUIServiceUS/bin/CustomerReturnUIService: symbol lookup error: /apollo/env/CustomerReturnUIServiceUS/bin/CustomerReturnUIService: undefined symbol: _ZN19CreturnLabelPrinter10PrintLabelESsSsiiiSsbSs

The "Success connecting to socket" is logged by a method call INSIDE of CreturnLabelPrinter::PrintLabel...how can I be getting an undefined symbol exception for that? This is a non-static method. The code for it is not relevant (and I can't post it here anyways)...I am just wondering what conditions this could happen under. I haven't seen any problems during the compiling and linking of these modules. The calling method is in a different library than the "undefined symbol".

Upvotes: -1

Views: 3669

Answers (1)

tmaric
tmaric

Reputation: 5477

Thi happened to me when I had 2 versions of the library and I was linking against the wrong one. Also c++filt shows:

$ c++filt __ZN19CreturnLabelPrinter10PrintLabelESsSsiiiSsbSs
CreturnLabelPrinter::PrintLabel(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int, int, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)

This has a huge list of arguments, did you check them?

Upvotes: 1

Related Questions