Wrong CEF_API_HASH_PLATFORM

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.

Wrong CEF_API_HASH_PLATFORM

Postby Elviin » Tue Nov 26, 2024 2:56 pm

I have integrated my custom compiled CEF and I am getting a wrong api hash:

Code: Select all
NO_SANITIZE("cfi-icall")
CEF_GLOBAL bool CefInitialize(const CefMainArgs& args,
                              const CefSettings& settings,
                              CefRefPtr<CefApp> application,
                              void* windows_sandbox_info) {
  const char* api_hash = cef_api_hash(0);
  printf("CEF_API_HASH_PLATFORM: %s\n", CEF_API_HASH_PLATFORM);
  if (strcmp(api_hash, CEF_API_HASH_PLATFORM)) {
    // The libcef API hash does not match the current header API hash.
    DCHECK(false); // <<<<<< here the execution ends
    return false;
  }


I have double checked my source files for building the libcef_dll_wrapper library and there is this string defined in the cef_api_hash.h:
Code: Select all
...
#elif defined(OS_MAC)
#define CEF_API_HASH_PLATFORM "c045e75415a6abc2c29a3e1e05baea7528e2ec28"


But the value seems to be not defined.
Code: Select all
(lldb) expr (const char*)CEF_API_HASH_PLATFORM
error: <user expression 0>:1:14: use of undeclared identifier 'CEF_API_HASH_PLATFORM'
    1 | (const char*)CEF_API_HASH_PLATFORM


1) CEF_API_HASH_PLATFORM is defined in the CEF framework and the cef_api_hash(0); comes from the libcef_dll_wrapper? or is it other way around?

2) Should I compile libcef_dll_wrapper.a myself, or get it somewhere else?


Thank you.
Elviin
Elviin
Techie
 
Posts: 23
Joined: Tue Oct 22, 2024 3:06 am

Re: Wrong CEF_API_HASH_PLATFORM

Postby magreenblatt » Tue Nov 26, 2024 4:22 pm

1. Other way around.
2. Build it yourself at the matching version using a CEF binary distribution.
magreenblatt
Site Admin
 
Posts: 13006
Joined: Fri May 29, 2009 6:57 pm

Re: Wrong CEF_API_HASH_PLATFORM

Postby Elviin » Wed Dec 04, 2024 9:41 am

The issue was caused by another version of the same library libcef_dll_wrapper.a. The file was loaded before the correct library, and that is why the id's did not match.
Elviin
Techie
 
Posts: 23
Joined: Tue Oct 22, 2024 3:06 am


Return to Support Forum

Who is online

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