Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2015 Unable to build in Debug mode #1820

Closed
kendallb opened this issue Sep 28, 2016 · 9 comments
Closed

VS2015 Unable to build in Debug mode #1820

kendallb opened this issue Sep 28, 2016 · 9 comments
Labels
Milestone

Comments

@kendallb
Copy link

Can't seem to find anything about this but when I loaded the project into VS2015 and did a full build, it fails on CefShare.Core with a bunch of errors like this:

Severity Code Description Project File Line Suppression State
Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in AssemblyInfo.obj CefSharp.Core C:\src\git\CefSharp\CefSharp.Core\libcef_dll_wrapper.lib(cef_stream_resource_handler.obj) 1
Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in AssemblyInfo.obj CefSharp.Core C:\src\git\CefSharp\CefSharp.Core\libcef_dll_wrapper.lib(cef_stream_resource_handler.obj) 1

Doing a Google search I found this article which indicates that this is caused by linking debug binaries with release ones for the C++ code, so I changed to release mode and rebuilt and it worked fine.

Is there some reason the project does not compile properly in debug mode and how do we fix it?

@amaitland
Copy link
Member

Can't seem to find anything about this but when I loaded the project into VS2015 and did a full build, it fails on CefShare.Core with a bunch of errors like this:

Official releases are made using VS2013, so it's rare that I use VS2015 for development.

I can confirm there is a problem using VS2015 Update 2, about all I have time for at the moment.

@kendallb
Copy link
Author

Ok thanks. I tried running the samples built with VS2015 and they didn't seem to run properly either, so something is not building right. I don't have VS2013 installed anymore :(

@amaitland
Copy link
Member

You can use the https://github.com/cefsharp/CefSharp.MinimalExample for testing

@amaitland amaitland changed the title Can't build in debug mode? VS2015 Unable to build in Debug mode Sep 28, 2016
@kendallb
Copy link
Author

Yep, I have been using that.

@amaitland
Copy link
Member

When cmake generates libcef_dll_wrapper.vcxproj for VS2015 it's incorrectly setting RuntimeLibrary

<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>

Should be

<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>

Upgrading to newer cmake had no effect. build.ps can be updated to work around the problem.

Changes are required to https://github.com/cefsharp/cef-binary/blob/master/build.ps1#L226

Would be best fixed in CEF source, though that would take some time before the changes were merged I'm sure.

@amaitland
Copy link
Member

Relevant changes to CEF were https://bitbucket.org/chromiumembedded/cef/commits/b52741d23676a0b6c589ce3aedb2430a21b51c94

Can likely just disable sandbox and our builds will work as expected.

@amaitland
Copy link
Member

Changes will take effect soon as I upload the next set of packages - should be today sometime.

@amaitland
Copy link
Member

master has been updated.

@kendallb
Copy link
Author

kendallb commented Oct 4, 2016

Awesome

merceyz pushed a commit to cefsharp/cef-binary that referenced this issue Apr 12, 2017
Former-commit-id: da51fe8501eb797872278a60e63f9014549a42ef
merceyz pushed a commit to cefsharp/cef-binary that referenced this issue Apr 12, 2017
Former-commit-id: da51fe8501eb797872278a60e63f9014549a42ef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants