Unable to run CEFBuilds on Visual Studio 2010

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.

Unable to run CEFBuilds on Visual Studio 2010

Postby benjtupas » Tue Apr 22, 2014 10:49 pm

I'm trying out the tutorial for Windows on the wikipage of CEF at https://code.google.com/p/chromiumembedded/wiki/Tutorial.

However, the CEF builds for 32 bit and 64 bit won't build/run on Visual Studio 2010.

By the way, I'm running Windows 7 (64 bit) and Visual Studio 2010.

Here are the errors:

32 bit Build
Code: Select all
- error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in simple_app.obj
- (A THOUSAND LINES OF ERRORS)
- out\Debug\cefsimple.exe : fatal error LNK1120: 11 unresolved externals


64 bit Build
Code: Select all
- out\Debug\obj\libcef_dll_wrapper\transfer_util.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
- LINK : fatal error LNK1104: cannot open file 'C:\Users\Benj\Desktop\Blueprint Gaming\Chromium Embedded Framework\64 Bit\cef_binary_3.1921.1661_windows64\out\Debug\lib\libcef_dll_wrapper.lib'
benjtupas
Techie
 
Posts: 15
Joined: Tue Apr 22, 2014 10:29 pm

Re: Unable to run CEFBuilds on Visual Studio 2010

Postby magreenblatt » Wed Apr 23, 2014 10:25 am

benjtupas wrote:32 bit Build
Code: Select all
- error LNK2038: mismatch detected for '_MSC_VER': value '1800' doesn't match value '1600' in simple_app.obj
- (A THOUSAND LINES OF ERRORS)
- out\Debug\cefsimple.exe : fatal error LNK1120: 11 unresolved externals

Set CEF_ENABLE_SANDBOX to 0 as described here.

benjtupas wrote:64 bit Build
Code: Select all
- out\Debug\obj\libcef_dll_wrapper\transfer_util.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
- LINK : fatal error LNK1104: cannot open file 'C:\Users\Benj\Desktop\Blueprint Gaming\Chromium Embedded Framework\64 Bit\cef_binary_3.1921.1661_windows64\out\Debug\lib\libcef_dll_wrapper.lib'

Select 64-bit platform in Configuration Manager as described here. If VS2010 does not support 64-bit builds then you will need to use a newer VS version.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm

Re: Unable to run CEFBuilds on Visual Studio 2010

Postby jholt » Mon May 05, 2014 10:37 am

I am required to use VS2010 (due to other dependencies), and based on the "Windows Build Requirement" on the BranchedAndBuilding page, I'm using the 1750 branch (currently the 3.1750.1679 binary from cefbuilds.com)

The advice to disable sandbox support (#define CEF_ENABLE_SANDBOX 0) resolved the LNK2038/MSC_VER mismatch, and the cefsimple app built OK, but the cefclient app still failed to build with these errors for me (perhaps because I have VS2013 and Windows Kit 8.0 installed as well for other reasons)

Code: Select all
1>  client_handler_win.cpp
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\gl/gl.h(22): fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory
1>C:\Program Files (x86)\Windows Kits\8.0\Include\shared\windowsx.h(17): fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory
1>C:\Program Files (x86)\Windows Kits\8.0\Include\um\shlobj.h(12): fatal error C1083: Cannot open include file: 'winapifamily.h': No such file or directory


I was able to resolve this by simply removing the three references to the Windows Kits\8.0\Include\* in the cefclient project settings (Configuration,C/C++,General,Additional Include Directories)

I do have a couple of questions:
1. What exactly is the impact of using the CEF_ENABLE_SANDBOX vs. not? Specifically, I would like to support PNaCl - is the sandbox required for this?
2. What is the SANDBOX dependency on VS2013/WinSDK8? Is it possible to build it against VS2010/WinSDK7 (or WinSDK8 if careful with API use) if I build from source?
3. Similarly, could I use the newer 1916/Chrome 35 branch with VS2010?
jholt
Techie
 
Posts: 27
Joined: Fri May 02, 2014 4:29 pm

Re: Unable to run CEFBuilds on Visual Studio 2010

Postby magreenblatt » Tue May 06, 2014 1:38 pm

jholt wrote:1. What exactly is the impact of using the CEF_ENABLE_SANDBOX vs. not? Specifically, I would like to support PNaCl - is the sandbox required for this?

NaCl should still work.
jholt wrote:2. What is the SANDBOX dependency on VS2013/WinSDK8? Is it possible to build it against VS2010/WinSDK7 (or WinSDK8 if careful with API use) if I build from source?

See viewtopic.php?f=6&t=11720#p21255
jholt wrote:3. Similarly, could I use the newer 1916/Chrome 35 branch with VS2010?

You can use the binary distribution with VS2010 but building Chromium/CEF from source requires VS2013.
magreenblatt
Site Admin
 
Posts: 12408
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 64 guests