Download

c++ 4.17 Transition Guide

Dear Community,

Wohooo! 4.17 is here!

This is a thread where you can share your research as you upgrade to 4.17 from any prior engine versions.

You can also post questions/issues you encounter here regarding the upgrade.


**VS2015 Update 3 Required**

A fundamental C++ change:



```


Visual Studio 2015 Update 3 is now required to compile UE4 on Windows.


```



**Proceed Carefully, getting 2015 Update 3 will break engine versions older than 4.11**

**VS2015 Update 3**
https://blogs.msdn.microsoft.com/vcblog/2016/06/28/visual-studio-2015-update-3-available-now/

Compiling Older Engine Versions & Also 4.17

If you are locked on 4.11 but want to support compiling for 4.17 on your computer, you can download a QFE so your 4.11 install will not break:

Enable 4.11 to work with 4.17 (from C++ perspective), UE4 QFEs

Please note engine versions older than 4.11 are** not** compatible with VS2015 update 3, so if you get it, you will no longer be able to develop for those older versions.

In other words, C++ compiling for engine versions older than 4.11 and 4.17 are **mutually exclusive **on your dev machine.

4.12 hotfixed version and higher are compatible with VS2015 update 3, and will work fine after you get the update in order to compile for 4.17.


**QFE Build For Inability to Compile Projects in 4.17**

**Until 4.17.2 is released**, you can use this QFE if you are unable to compile your project after upgrading to 4.17 (And you also have VS2015 update 3

**QFE 4.17.0**
https://forums.unrealengine.com/showthread.php?151497-Annoying-compile-issue-in-4-17-preview-3&p=747721&viewfull=1#post747721

Enjoy!

♥

Rama

Does it work with Visual Studio 2017?

VS 2017 support started in UE 4.14.

You still need VS2015 update 3 even if you want to use VS 2017, at least that was my experience when I tried compiling in 2017 :slight_smile:

If anyone discovers otherwise let me know

:slight_smile:

Rama

VS 2017 is working just fine for me

Last I tried, you needed some minimal components but it worked after uninstalling 2015 and installing the standalone build tools.

Note a number of people have reported having this incredibly annoying bug with compiling projects for 4.17. It seems to be hit and miss, but may be specific to VS 2017.

UHT is stricter in 4.17, you may have to fix up some issues with incompatible specifiers that it previously let slide.

One requirement is that USTRUCTs with Blueprint-accessible UPROPERTYs are themselves marked as BlueprintType. If you have structs that are used as bases only and shouldn’t be exposed, but still provide Blueprint-accessible properties for structs derived from them, you can mark the base struct as BlueprintInternalUseOnly instead.

A few changes to plugins. My project relies on plugins / modules HEAVILY, so I’m running into issues left right and center at the moment. The First change is that UBT will no longer compile the following - but you don’t get any warning, it will just completely crash. Instead plugins can only have one ‘Type’ specified. In theory this should always have been the case anyway, but UBT never used to outright crash…



{
	"FileVersion": 3,
	"Version": 1,
	"VersionName": "1.0",
	"FriendlyName": "ST Cascade Extensions",
	"Description": "Adds new modules to Cascade",
	"Category": "Stormtide.FX",
	"CreatedBy": "Stormtide Ltd.",
	"CreatedByURL": "www.stormtide.co.uk",
	"DocsURL": "",
	"MarketplaceURL": "",
	"SupportURL": "",
	"CanContainContent": false,
	"Modules": 
		{
			"Name": "ST_CascadeExtensions",
			"Type": "Runtime",
			"LoadingPhase": "PreDefault"
		},
		{
			"Name": "ST_CascadeExtensions",
			"Type": "Developer",
			"LoadingPhase": "PreDefault"
		},
		{
			"Name": "ST_CascadeExtensions",
			"Type": "Editor",
			"LoadingPhase": "PreDefault"
		}
	]
}


Becomes:



{
	"FileVersion": 3,
	"Version": 1,
	"VersionName": "1.0",
	"FriendlyName": "ST Cascade Extensions",
	"Description": "Adds new modules to Cascade",
	"Category": "Stormtide.FX",
	"CreatedBy": "Stormtide Ltd.",
	"CreatedByURL": "www.stormtide.co.uk",
	"DocsURL": "",
	"MarketplaceURL": "",
	"SupportURL": "",
	"CanContainContent": false,
	"Modules": 
		{
			"Name": "ST_CascadeExtensions",
			"Type": "Runtime",
			"LoadingPhase": "PreDefault"
		}
	]
}


Another thing. I don’t know why the hell this was changed because it seems totally unneccesary, but if your plugin depends on other modules in it’s build .cs file like so:



// Copyright (C) Stormtide Ltd. 2017. All Rights Reserved.

using UnrealBuildTool;
using System.IO;

public class ST_FX : ModuleRules
{
    public ST_FX(ReadOnlyTargetRules ROTargetRules) : base(ROTargetRules)
    {
        PublicIncludePaths.AddRange(new string] { "ST_FX/Public" });
        PrivateIncludePaths.AddRange(new string] { "ST_FX/Private" });

        PublicDependencyModuleNames.AddRange(new string] { "Core", "CoreUObject", "Engine", "InputCore" });

        // Custom Plugin Includes - Assertions
        PrivateDependencyModuleNames.AddRange(new string] { "ST_Core" });
        PrivateIncludePathModuleNames.AddRange(new string] { "ST_Core" });
        PrivateDependencyModuleNames.AddRange(new string] { "ST_Assertions" });
        PrivateIncludePathModuleNames.AddRange(new string] { "ST_Assertions" });
        PublicIncludePaths.AddRange(new string] { "ST_Core/Public" });
    }
}


Then you have to add those Plugins to the uplugin file for that plugin. My ST_FX plugin relies on ST_Core, so I now ST_FX.uplugin has to look like this:



{
	"FileVersion": 3,
	"Version": 1,
	"VersionName": "1.0",
	"FriendlyName": "ST FX",
	"Description": "This plugin defines some reusable actor classes for spawning effects in the world, like explosions and impacts.",
	"Category": "Stormtide.FX",
	"CreatedBy": "Stormtide Ltd.",
	"CreatedByURL": "www.stormtide.co.uk",
	"DocsURL": "",
	"MarketplaceURL": "",
	"SupportURL": "",
	"CanContainContent": false,
	"Modules": 
		{
			"Name": "ST_FX",
			"Type": "Runtime",
			"LoadingPhase": "PreDefault"
		}
	]
	"Plugins": 
		{
			"Name": "ST_Core",
			"Enabled": true
		}
	]
}


Hey everyone, I just wanted to let you know we are aware of the UHT/UBT issue and wanted to point you to Ben’s response on another thread

Just found this one. OPTIONAL_BINDING is no longer valid in Slate syntax.

This:
ECGame_RichTextBlock.cpp



	TAttribute<FText> TextBinding = OPTIONAL_BINDING(FText, Text);


Becomes:

ECGame_RichTextBlock.h



protected:
	PROPERTY_BINDING_IMPLEMENTATION(FText, Text);


ECGame_RichTextBlock.cpp



	TAttribute<FText> TextBinding = PROPERTY_BINDING(FText, Text);


Nope;
In first code there you declare three modules with exactly same signature, should never do that, I don’t know how this didn’t cause you problems before 4.17.
Each “Name” value must be unique; that’s probably a bug that they’ve fixed now with better module management code added, this is why now you see a crash (because that you were doing is wrong).
So not really because “Type” definition, it’s a crash because you had multiple modules with the same name.

I know that now, at the time I was copying the format from another plugin - now I’ve read up on the types and know I don’t need three. Even so, in prior versions it didn’t crash UBT and now it does with a very obscure error - so posting incase someone runs into the crash. Ben already told me the change was unintended.

Hey all,

when i try to launch editor from VS2017 i have this error:

and of course because i don’t have UE4.exe in that folder, any idea on how to solve it/why happen?

EDIT:

Solved

I’m using the steam api in my project and I was initially getting this crazy syntax error in my gen.cpp files when AddDynamic was used

I eventually managed to build the thing by going into the steam api headers and changing every instance of ARRAY_COUNT to STEAM_ARRAY_COUNT. There is a macro redefinition issue with the steam api that has been throwing warnings for a while, but something in 4.17 made it a showstopper

Workaround for that :

  1. Delete vs/Binaries/Intermediate/Save folders
  2. Delete Solution File (Not project File), optional delete VC Data File
  3. Right click on Project File and " Generate VS Project Files"
  4. Open New solution file and Rebuild.
  5. Done!

I somehow managed to get a shipping build done and when I click on the exe it starts the process but nothing happens. I have to close it from the task manager. The only bad things I see in the log files are these:


LogWindows: LoadLibraryWithSearchPaths failed for file aqProf.dll. GetLastError=0
LogWindows: LoadLibraryWithSearchPaths failed for file VtuneApi.dll. GetLastError=0
LogWindows: LoadLibraryWithSearchPaths failed for file VtuneApi32e.dll. GetLastError=0

Dear Community,

Thank you for the link @Jess.Hider!

Thank you for mentioning this @kamrann!

Sounds like Epic Ben Marsh will be getting us a QFE really soon!

I presume it will go live here when it is ready:

Thank you for letting us know @TheJamsh!

And thanks for sharing about the new rules regarding plugins :slight_smile:


Sharing together like this really makes these big C++ engine updates a lot more fun!

♥

Rama

he dropped it over here yesterday. It didn’t really work for me though

I done it before but forgot to delete the “Save” folder, now it work, thanks! :slight_smile:

Thanks for letting me know! I’ve updated OP, hopefully the QFE itself will be fixed and working soon if not already

:heart:

Rama