include file structure in latest release

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.

include file structure in latest release

Postby wundram » Wed May 02, 2012 2:07 pm

I'm trying to use the latest binary release, but I am running into some problems. The last binary release (1.936.439), had a cef.h file in the /include/ directory, and the references to other include files would be realtive to the /include/ directory, so for example, an include inside cef.h looks like

#include "internal/cef_win.h"

Now, with the latest release, there is no cef.h. That isn't a big deal, I can modify the code to include the various headers. However, the includes inside these includes are relative to the parent of /include/, so that a include in cef_base.h looks like

#include "include/internal/cef_win.h"

This seems like a really odd choice. Usually when you use a library, you want to add the include directory into your include path for your project, not the parent directory of the include path. Plus I have to include these things like

#include <include/cef_app.h>.

I'm wondering if I am missing some important details here? Why the change?
wundram
Newbie
 
Posts: 8
Joined: Thu Feb 23, 2012 12:33 pm

Re: include file structure in latest release

Postby magreenblatt » Wed May 02, 2012 2:14 pm

The Google C++ Style Guide requires that all files be included using the full path relative to the project root. In CEF's case we use paths relative to the "cef" directory. See http://google-styleguide.googlecode.com ... f_Includes for more information.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: include file structure in latest release

Postby wundram » Wed May 02, 2012 2:41 pm

Then wouldn't it make more sense to name the root include directory "cef" instead of "include", that way we would be including like
#include <cef/cef_base.h>
this is how the boost project seems to have handled this. And it would make it more clear that you should point your include path at the root.
wundram
Newbie
 
Posts: 8
Joined: Thu Feb 23, 2012 12:33 pm

Re: include file structure in latest release

Postby magreenblatt » Wed May 02, 2012 3:02 pm

wundram wrote:Then wouldn't it make more sense to name the root include directory "cef" instead of "include", that way we would be including like
#include <cef/cef_base.h>
this is how the boost project seems to have handled this. And it would make it more clear that you should point your include path at the root.

Not really. Then you would have /path/to/src/cef/cef/cef_base.h or /path/to/src/cef/include/cef/cef_base.h, neither of which is a great option.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: include file structure in latest release

Postby wundram » Wed May 02, 2012 3:10 pm

That is a good point. I think I am just cranky because I have to update all of my project files to deal with the new structure. :)
wundram
Newbie
 
Posts: 8
Joined: Thu Feb 23, 2012 12:33 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 208 guests