Page 1 of 1

undefined reference to `[...]~RefCountedThreadSafeBase()`

PostPosted: Fri Oct 15, 2021 8:17 am
by cherusker
Hi,

we're upgrading to CEF 95 right now and ran into an issue where, if we try to link a release build of CEF into a debug build of our own app, we'll end up with an undefined symbol `base::cef_subtle::RefCountedThreadSafeBase::~RefCountedThreadSafeBase()`.

This comes from the fact that _if_ `DCHECK_IS_ON() == false` during the CEF build, the function definition wouldn't be built: https://bitbucket.org/chromiumembedded/ ... c#lines-29

However, including the CEF header files during in a debug build (where `NDEBUG` is not set), we'll end up with needing an external definition for `~RefCountedThreadSafeBase()` in https://bitbucket.org/chromiumembedded/ ... #lines-189.

Was this step taken deliberately or is this something that could be looked into being fixed in an upcoming release? Generally speaking, while we do want to run a debug build of our own software, we don't necessarily want to enable debug info in CEF (as we trust it will work as advertised ;) )

Thanks
Armin

Re: undefined reference to `[...]~RefCountedThreadSafeBase()

PostPosted: Fri Oct 15, 2021 3:00 pm
by magreenblatt
The configuration of libcef_dll_wrapper (Debug or Release, and compiler flags) must match your project configuration. You can then use a Debug or Release build of libcef.dll.

Re: undefined reference to `[...]~RefCountedThreadSafeBase()

PostPosted: Thu Dec 08, 2022 1:15 pm
by zpj
I found ~RefCountedThreadSafeBase() was disabled by macro DCHECK_IS_ON (at file libcef_dll_wrapper/libcef_dll\base/cef_ref_counted.cc) in release mode. You can define DCHECK_ALWAYS_ON to solve.