Building on Mac

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.

Building on Mac

Postby nologic » Wed Aug 27, 2014 3:04 pm

Hello!

I've just started looking at CEF and having some trouble getting the simplest examples to work. Referring to the most basic code from the tutorial:

Code: Select all
#include <sstream>
#include <string>

#include "include/cef_app.h"

// Entry point function for sub-processes.
int main(int argc, char* argv[]) {
    // Provide CEF with command-line arguments.
    CefMainArgs main_args(argc, argv);
   
    // Execute the sub-process.
    return CefExecuteProcess(main_args, NULL, NULL);
}


I get an error saying that CefMainArgs is not found. Grepping the include files for the mac zip package I don't even had this class declared. Also had the same problem when looking at the SimpleApp with CefBrowserProcessHandler.

What am I missing?

Thanks.
nologic
Newbie
 
Posts: 3
Joined: Wed Aug 27, 2014 2:58 pm

Re: Building on Mac

Postby magreenblatt » Wed Aug 27, 2014 3:58 pm

CefMainArgs is defined in include/internal/cef_mac.h. Including include/cef_base.h should be sufficient.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Building on Mac

Postby nologic » Wed Aug 27, 2014 4:11 pm

I downloaded this file: http://www.magpcss.net/cef_downloads/in ... macosx.zip

the include/internal/cef_mac.h does not define CefMainArgs for me. Grep can't find any file that does.
nologic
Newbie
 
Posts: 3
Joined: Wed Aug 27, 2014 2:58 pm

Re: Building on Mac

Postby nologic » Wed Aug 27, 2014 4:18 pm

Sorry, I've just realized that I've been trying it with CEF 1. It works with CEF 3!
nologic
Newbie
 
Posts: 3
Joined: Wed Aug 27, 2014 2:58 pm

Re: Building on Mac

Postby magreenblatt » Wed Aug 27, 2014 4:18 pm

That download is for CEF1. You want CEF3.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 84 guests