Original report by Anonymous.
Original issue 38 created by tux316 on 2009-06-24T18:05:38.000Z:
The following declaration works in ISO C++, but it is invalid in ISO C:
enum cef_retval_t (CEF_CALLBACK *handle_before_browse)(
struct _cef_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
cef_handler_navtype_t navType, int isRedirect);
This is because "cef_handler_navtype_t" is an enumerator, and when "Compile
as C Code (/TC)" is in effect, it will not compile. There are 4 similar
cases of this, all throughout cef_capi.h.
The correct way:
enum cef_retval_t (CEF_CALLBACK *handle_before_browse)(
struct _cef_handler_t* self, struct _cef_browser_t* browser,
struct _cef_frame_t* frame, struct _cef_request_t* request,
enum cef_handler_navtype_t navType, int isRedirect);
I have attached a patch that fixes all 4 declarations in cef_capi.h. There
is no need to fix these anywhere else from my perspective, since the
projects in the CEF Solution are all compiled as C++ code.