cef-115.3.10 compilation error (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.

cef-115.3.10 compilation error (RefCountedThreadSafeBase)

Postby tapineb371 » Thu Dec 14, 2023 6:34 am

Hi Devs,

I'm trying to upgrade current CEF version from 92.0.21 to 115.3.10.

Facing a compilation error. It is either in context or relevant to my recent post https://magpcss.org/ceforum/viewtopic.php?f=6&t=19655

I'm seeing this compilation error for x86_64(intel-based mac) while trying to build with -DCMAKE_BUILD_TYPE=Release.

When I use -DCMAKE_BUILD_TYPE=Debug, compilation succeeds, but later leads to the SIGTRAP crash as posted in the above URL.

Error message:

Code: Select all
Undefined symbols for architecture x86_64:
  "base::cef_subtle::RefCountedThreadSafeBase::~RefCountedThreadSafeBase()", referenced from:
      base::cef_internal::BindState<void (EmbBrowserHandler::*)(bool), scoped_refptr<EmbBrowserHandler>, bool>::BindState<void (EmbBrowserHandler::*)(bool), EmbBrowserHandler*, bool&>(std::__1::integral_constant<bool, false>, void (*)(), void (EmbBrowserHandler::*&&)(bool), EmbBrowserHandler*&&, bool&) in CefBrowserHandler.o
      base::cef_internal::BindState<void (EmbBrowserHandler::*)(bool), scoped_refptr<EmbBrowserHandler>, bool>::Destroy(base::cef_internal::BindStateBase const*) in CefBrowserHandler.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Does the release code have different symbols for RefCountedThreadSafeBase?

I'm new to the code-base and mystified of what's happening here.

Thanks for any help in advance.
tapineb371
Techie
 
Posts: 14
Joined: Mon Sep 04, 2023 8:49 pm

Re: cef-115.3.10 compilation error (RefCountedThreadSafeBase

Postby magreenblatt » Thu Dec 14, 2023 9:43 am

Does the release code have different symbols for RefCountedThreadSafeBase?

Yes, you need separate builds of libcef_dll_wrapper.lib for Debug and Release.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: cef-115.3.10 compilation error (RefCountedThreadSafeBase

Postby tapineb371 » Sat Dec 16, 2023 4:19 am

magreenblatt wrote:Yes, you need separate builds of libcef_dll_wrapper.lib for Debug and Release.

Thanks for the reply. I have separated the configuration but needed to define NDEBUG in release build settings which resolved the compilation error.

Resolution: For Release builds add -DNDEBUG to all the targets in your project settings. It is also mentioned in cef_logging.h.

cef_logging.h
// Always define the DCHECK_IS_ON macro which is used from other CEF headers.
#if defined(NDEBUG) && !defined(DCHECK_ALWAYS_ON)
#define DCHECK_IS_ON() false
#else
#define DCHECK_IS_ON() true
#endif
tapineb371
Techie
 
Posts: 14
Joined: Mon Sep 04, 2023 8:49 pm


Return to Support Forum

Who is online

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