简体   繁体   中英

How to build CEF1 for Visual Studio 2017

I need to use CEF1 (not CEF3) and I need to do it in VS2017 (rest of the project is in VS2017). Which is a bit of problem, as VS2017 didn't exist at the time of CEF1. I don't even know how to begin. I tried to compile CEF1 in older Visual Studio, but then got linker error for mismatching _MSC_VER

Before I start my answer I need to say that it is highly recommended that you use CEF3 instead. The reasons include:

  • CEF3 is in active development, currently receiving support, improvements and bug fixes.
  • CEF3 uses modern versions of Chromium under the hood. Eg 61 and 62 and the time of writing.
  • CEF1 is stuck at Chromium 27.
  • CEF3 can be started in a single process mode, similar to how CEF1 was functioning. This is the biggest reason in my opinion one might want to use it. (Actually I wonder why do you want to use CEF1?)

My answer:

  1. If you can find the branch number you want in this archive (it has binaries for some older CEF1 branches) or if you already have some binaries then you should be able to link them against your VS 2017 project no problem.

  2. If not, then you need to build CEF1 from source. The easiest way in my mind is to satisfy the system requirements for building the release branch 1453 (the last one to support CEF1):

    • Having VS2010
    • Windows 8 SDK
  3. You could also try to build CEF1 in VS2017. In this way you are likely to encounter more build errors.

Once the 2nd or 3rd step is complete you can use the output in the VS2017 C++ project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM