Using CEF with VS2013

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.

Using CEF with VS2013

Postby BenjiSBRK » Tue Jan 21, 2014 10:12 am

Hi,
I've been trying to get CEF3 to work with the Visual Studio 2013 compiler with no success (I need to use it in an framework that only compiles with VS2013). I first tried to use the 1650 release, but I got a lot of LNK2038 errors (mismatch detected for '_MSC_VER': value '1600' doesn't match value '1800') because this was compiled with the VS2010 compiler.
Then I tried building CEF3 from the instructions found here, I did set GYP_GENERATORS to "ninja" and GYP_MSVS_VERSION to "2013" like explained to compile with VS2013, I waited a while for everything to compile and to package, but again, I got the same LNK2038 errors when trying to build cefclient with VS2013. I don't know if it changes anything but I have VS 2010, 2012 and 2013 installed on my machine. Could it be that gyp detects 2010 or 2012 installed and uses it instead of 2013 ?
BenjiSBRK
Techie
 
Posts: 35
Joined: Tue Jan 21, 2014 9:59 am

Re: Using CEF with VS2013

Postby magreenblatt » Tue Jan 21, 2014 11:34 am

1. Did you set the GYP variables in the same command window (set GYP_...=...) before running cef_create_projects.bat?
2. What path is at the top of your out/Debug/build.ninja file? Is it the correct path for VS2013?
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using CEF with VS2013

Postby puresimmer » Tue Jan 21, 2014 11:55 am

If this helps...

I am able to build CEF trunk with Chromium revison @242756 using VS 2013 (Ninja) with no problems.

The CEF 1650 release & http://src.chromium.org/svn/releases/31.0.1650.57 combination still has tons of issues with building under VS 2013 (in the Chromium source -- third_party stuff in particular). There are still tons of places that need #include <algorithm>, math changes etc. I started trying to do it locally but gave up, since I have a VS 2010 VM I can build 1650 on the "old way".

I'm going to wait until the next official CEF release branch/update to give it another go, I'll let you know if I make any progress between now and then.

Shaun
puresimmer
Techie
 
Posts: 13
Joined: Mon Jan 20, 2014 6:05 pm

Re: Using CEF with VS2013

Postby BenjiSBRK » Tue Jan 21, 2014 12:37 pm

magreenblatt wrote:1. Did you set the GYP variables in the same command window (set GYP_...=...) before running cef_create_projects.bat?
2. What path is at the top of your out/Debug/build.ninja file? Is it the correct path for VS2013?

1. yes, I did
2. no, it's "Microsoft Visual Studio 10.0". Is this generated before building or do I have to change it manually ? If so, it would be nice to update the instructions accordingly

I have uninstalled VS2010 and 2012 and removed everything not Vs2013 in gyp's MSVSVersion.py, I'll give it another go
puresimmer wrote:If this helps...

I am able to build CEF trunk with Chromium revison @242756 using VS 2013 (Ninja) with no problems.

The CEF 1650 release & http://src.chromium.org/svn/releases/31.0.1650.57 combination still has tons of issues with building under VS 2013 (in the Chromium source -- third_party stuff in particular). There are still tons of places that need #include <algorithm>, math changes etc. I started trying to do it locally but gave up, since I have a VS 2010 VM I can build 1650 on the "old way".

I'm going to wait until the next official CEF release branch/update to give it another go, I'll let you know if I make any progress between now and then.

Shaun

Do you use the v120 compiler ?
BenjiSBRK
Techie
 
Posts: 35
Joined: Tue Jan 21, 2014 9:59 am

Re: Using CEF with VS2013

Postby magreenblatt » Tue Jan 21, 2014 11:28 pm

As suggested above try trunk instead of 1650. If the gyp variables are set correctly you should see the vs2013 paths in build.ninja after running cef_create_projects.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using CEF with VS2013

Postby BenjiSBRK » Wed Jan 22, 2014 5:55 am

magreenblatt wrote:As suggested above try trunk instead of 1650. If the gyp variables are set correctly you should see the vs2013 paths in build.ninja after running cef_create_projects.

I forgot to mention it but I did try trunk. I only got the 1650 release, then I did everything on trunk. I'm compiling again as I speak, this time build.ninja has the right path to cl.exe so I guess the other two VS installed did interfere. Should I report this on the gyp Google Code page ?
BenjiSBRK
Techie
 
Posts: 35
Joined: Tue Jan 21, 2014 9:59 am

Re: Using CEF with VS2013

Postby magreenblatt » Wed Jan 22, 2014 9:20 am

BenjiSBRK wrote:
magreenblatt wrote:As suggested above try trunk instead of 1650. If the gyp variables are set correctly you should see the vs2013 paths in build.ninja after running cef_create_projects.

I forgot to mention it but I did try trunk. I only got the 1650 release, then I did everything on trunk. I'm compiling again as I speak, this time build.ninja has the right path to cl.exe so I guess the other two VS installed did interfere. Should I report this on the gyp Google Code page ?

I have vs2010, vs2012 and vs2013 installed and don't have a problem choosing any of the vs versions via the gyp variable. It probably won't be helpful to report the problem in your case unless you can figure out what exactly caused it to fail.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Using CEF with VS2013

Postby BenjiSBRK » Wed Jan 22, 2014 10:56 am

magreenblatt wrote:
BenjiSBRK wrote:
magreenblatt wrote:As suggested above try trunk instead of 1650. If the gyp variables are set correctly you should see the vs2013 paths in build.ninja after running cef_create_projects.

I forgot to mention it but I did try trunk. I only got the 1650 release, then I did everything on trunk. I'm compiling again as I speak, this time build.ninja has the right path to cl.exe so I guess the other two VS installed did interfere. Should I report this on the gyp Google Code page ?

I have vs2010, vs2012 and vs2013 installed and don't have a problem choosing any of the vs versions via the gyp variable. It probably won't be helpful to report the problem in your case unless you can figure out what exactly caused it to fail.

Yes, since I'm not familiar at all with gyp and ninja and I have ran the automate script and tried to build a few times in the day, I might have failed somewhere. It's working just fine now, thanks for your help !
BenjiSBRK
Techie
 
Posts: 35
Joined: Tue Jan 21, 2014 9:59 am


Return to Support Forum

Who is online

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