How to use Chromium Embedded Framework with Visual Studio 2017 (C++)?

otah007 picture otah007 · Jul 17, 2017 · Viewed 8.7k times · Source

I would like to use CEF with VS 2017 using C++ (not C#, so CEFSharp won't work here). I can't quite understand how to do this. From what I have read, it seems like I need to build the source into a .sln file and then modify the existing code, however their site also says there are binaries available to download, which is confusing me.

How do I program in C++ using CEF and VS 2017?

Answer

Sga picture Sga · Aug 1, 2017
  1. Download CEF3 binaries, and extract archive to folder
  2. Download and install CMake
  3. Open CMake, and set:
    • Where is the source code: folder
    • Where to build the binaries: folder/build
  4. Press Configure
  5. Press Generate
  6. Open solution in folder/build/cef.sln
  7. Build Debug/Release
  8. Reference in your project folder/build/libcef_dll_wrapper/[Debug|Release]/libcef_dll_wrapper.lib
  9. Copy files to your bin folder:
    • folder/[Debug|Release]
    • folder/Resources