Warning C4653 and error C4883

Hello.

I’m trying to compile source code (v 4.11) in Visual Studio Community 2013 with update 4 and Visual Studio Community 2015 with update 2. Both versions I got same errors in “Development” solution configuration:

warning C4653: compiler option ‘Optimizations (one or more of /Oawstgp[y]) or debug checks (one or more of /GZ, /RTCcsu)’ inconsistent with precompiled header; current command-line option ignored
error C4883: ‘FSlateEditorStyle::FStyle::SetupGeneralStyles’: function size suppresses optimizations

“Development-editor” solution configuration build fine, without errors.

Can someone help me with any idea?.

Thanks in advanced.

Bump

I have this exact same problem.
Fresh download of the Source from GitHub. Setup run, project files generated, VS 2015 U2 Community. Makes no sense.

Seems the common theme here (and in other posts on this same topic) is trying to build on VS 2015 update 2.

Unless something changed in version 4.12 released this morning (but didn’t see anything in the release notes), UE4 does not yet support VS 2015 update 2. I have no troubles using update 1 or earlier version though

I’ve been holding off upgrading until it’s officially supported, but hopefully someone has and could post some info? Might be easier to uninstall update 2 if you don’t get an answer soon.

Solved!!

It’s a modification they put in to VS. you can simply get around it by placing:
#pragma warning(disable: 4883)

at the top of the CPP file. In my scenario, it was failing on building the “MinidumpDiagnostics” program with the SlateEditorStyle.cpp file.
After the added pragma line above, the program compiled just fine.

1 Like

That is not a solution. Warnings are there for a reason. Warnings once ignored turn into bugs. Bugs that are hard to track down.

This was addressed in Epic Change List # 3004185.

Open up EditorStyle.Build.CS.

Locate the following line:

	OptimizeCode = CodeOptimization.Never;

Beneath that add the following line.

           PCHUsage = ModuleRules.PCHUsageMode.NoSharedPCHs;

Re-Run GenerateProjectFiles.

Rebuild.

This fixes compilation issues with MinidumpDiagnostics, SlateViewer, and any other project that is pulling in those headers from the EditorStyle module.