Provide ready to build projects

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.

Provide ready to build projects

Postby pedrovicente » Sun Mar 05, 2017 3:22 pm

is there any chance to provide ready to build Visual Studio projects ?

the build system seems unnecessarily complicated and it fails on Windows

just doing

git clone <repo>
open Visual Studio project
build

easy
pedrovicente
Newbie
 
Posts: 6
Joined: Sun Mar 05, 2017 3:02 pm

Re: Provide ready to build projects

Postby magreenblatt » Mon Mar 06, 2017 12:03 pm

Download a binary distribution from http://opensource.spotify.com/cefbuilds/index.html and follow the instructions in the included README.txt file.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Provide ready to build projects

Postby pedrovicente » Mon Mar 06, 2017 12:44 pm

yes, I did that and cmake generated the projects, build and run the samples, thanks

my goal was to actually build libcef, but this is a start

I had to use an old version because it seems the latest
03/01/2017 - CEF 3.2924.1575.g97389a9 / Chromium 56.0.2924.76

has a bug in the debug compiler flags generation, it builds as Multithreaded , instead of Multithreaded debug

this
Code: Select all
list(APPEND CEF_COMPILER_FLAGS_DEBUG
      /MT           # Multithreaded release runtime
      )


should be
Code: Select all
/MTd
pedrovicente
Newbie
 
Posts: 6
Joined: Sun Mar 05, 2017 3:02 pm

Re: Provide ready to build projects

Postby magreenblatt » Mon Mar 06, 2017 1:00 pm

The CMake configuration is intentional. See https://bitbucket.org/chromiumembedded/ ... ys_on-true
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Provide ready to build projects

Postby pedrovicente » Mon Mar 06, 2017 1:14 pm

The CMake configuration is intentional. See https://bitbucket.org/chromiumembedded/ ... ys_on-true


I see..
My goal is to use libcef_dll as a library in a project that needs CEF

this one

https://github.com/sjlamerton/wxWebViewChromium

I always use Multithreaded debug, so, like this anyone that uses this CMake configuration of release will have linking errors because we are mixing debug and release libraries
pedrovicente
Newbie
 
Posts: 6
Joined: Sun Mar 05, 2017 3:02 pm

Re: Provide ready to build projects

Postby magreenblatt » Mon Mar 06, 2017 1:28 pm

Disable the sandbox by passing -DUSE_SANDBOX=Off to cmake if you want to use /MTd.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: Provide ready to build projects

Postby pedrovicente » Mon Mar 06, 2017 1:48 pm

ok, thanks

unrelated issue

Cmake always generates Visual Studio projects with absolute paths... this works well if you are only developing in one machine.
In my case I use a git repo to make builds in many machines and on some I don't have admin access to run cmake.
so, my "trick" for the generated Visual Studio projects is to manually edit the projects, replace the absolute paths by relative paths (for example, ".\..\..") and remove all the cmake stuff, that is not needed now.

this has been working well until I did this for this case

the samples run well with the absolute path projects, but with the relative I get an exception on this code

Code: Select all
 int _retval = cef_initialize(
      &args,
      &settings,
      CefAppCppToC::Wrap(application),
      windows_sandbox_info);


I added
Code: Select all
PATH=%PATH%;$(ProjectDir)..\..\Debug


to the Visual Studio "Environment" option so that the libcef.dll can be found
pedrovicente
Newbie
 
Posts: 6
Joined: Sun Mar 05, 2017 3:02 pm


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 33 guests