Page 1 of 1

Building libcef_dll_wrapper

PostPosted: Fri Jun 11, 2021 8:05 am
by oglo
Hi. I'm new to cef and I have a problem building libcef_dll_wrapper. I have a legacy project that uses cef, but this project configured only for release mode and I'm trying to add debug mode. So, I have downloaded the latest cef distribution and built it as explained in tutorial. Next, I've added new subproject for cef wrapper into existing solution (for MSVC2017) and copied "include" and "libcef_dll" folders from path_to_chromium\src\cef into it (such folders are used by release mode). Almost all parameters for project I took from existing release project, except that I replaced all NDEBUG macroses to _DEBUG. The problem I'm unable to build this projects - there are a lots of errors corresponding to missing 'net/base/net_error_list.h' and 'dlfcn.h' headers. Also there are some "fatal error C1189: #error: This file can be included DLL-side only" errors. So, what I'm doing wrong? May be I've took lib files from the wrong place?

Re: Building libcef_dll_wrapper

PostPosted: Fri Jun 11, 2021 10:20 am
by magreenblatt
You should take the files from a binary distribution. That includes a CMake configuration that shows required defines, etc. See the included README.txt for usage.

Re: Building libcef_dll_wrapper

PostPosted: Wed Jun 16, 2021 8:29 am
by oglo
Ok, I've downloaded binary destribution and compiled it with disabled iterator debugging (_HAS_ITERATOR_DEBUGGING=0;_ITERATOR_DEBUG_LEVEL=0). All previous errors had gone but I still cann't link it due
Code: Select all
libcef_dll_wrapper.lib(libcef_dll_wrapper.obj) : error LNK2001: unresolved external symbol _cef_parse_json_buffer

Re: Building libcef_dll_wrapper

PostPosted: Wed Jun 16, 2021 9:34 am
by magreenblatt
Are you using all binaries from the same binary distribution (libcef.dll, .lib, etc)?

Re: Building libcef_dll_wrapper

PostPosted: Thu Jun 17, 2021 3:44 am
by oglo
Yes, I copied them from Debug (I'm trying to create debug config of my app) folder of binary distribution.

Re: Building libcef_dll_wrapper

PostPosted: Thu Jun 17, 2021 4:27 am
by oglo
I'm sorry. It seems that I've messed some project's properties. I just tried to setup debug config of my app from scratch, and it builds. However, now libcef.dll throws exception at startup and I need to debug it.