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

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

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

Postby cherusker » Fri Oct 15, 2021 8:17 am

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
cherusker
Newbie
 
Posts: 4
Joined: Thu Jun 17, 2021 10:51 am

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

Postby magreenblatt » Fri Oct 15, 2021 3:00 pm

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.
magreenblatt
Site Admin
 
Posts: 12358
Joined: Fri May 29, 2009 6:57 pm

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

Postby zpj » Thu Dec 08, 2022 1:15 pm

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.
zpj
Newbie
 
Posts: 1
Joined: Thu Dec 08, 2022 1:03 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 19 guests

cron