https://bugs.llvm.org/show_bug.cgi?id=43352

            Bug ID: 43352
           Summary: Undefined symbols when using boost statecharts
           Product: lld
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: COFF
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Version 9.0.0 RC5

The same link works in ld. You can use the boost statechart as such:

namespace my_namespace
{
struct evt_done_state: boost::statechart::event<evt_done_state> {};
}

lld-link: error: undefined symbol:
__ZN5boost10statechart6detail10no_contextIN12my_namespace14evt_done_stateEE11no_funct>>>
referenced by (... file path)


Looking at the boost source code, there is declared, undefined function. This
was taken from boost 1.63.0, but the specific code is common for older and
newer versions:
boost\statechart\detail\reaction_dispatcher.hpp:33
template< class Event >
struct no_context
{
  void no_function( const Event & ); // <------
};

The method is not called or referenced, and shows up as 'U' in nm. I suspect ld
drops the unused, undefined symbol.

We're working around this by changing the offending line to:
void no_function( const Event & ) {}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to