Announcement

Collapse
No announcement yet.

c++ 4.17 Transition Guide

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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:

    Code:
    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/vcb...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
    https://forums.unrealengine.com/show...-Fix-Solutions

    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/show...l=1#post747721

    Enjoy!



    Rama
    Last edited by Rama; 08-13-2017, 09:22 AM.
    UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

    ♥ Rama

    #2
    Does it work with Visual Studio 2017?

    Comment


      #3
      Originally posted by falola View Post
      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

      If anyone discovers otherwise let me know



      Rama
      UE4 Marketplace: Melee Weapon Plugin & Compressed Binary Save System Plugin | Rama's C++ AI Jumping Videos | Vertex Snap Editor Plugin

      ♥ Rama

      Comment


        #4
        VS 2017 is working just fine for me

        Comment


          #5
          Originally posted by Rama View Post
          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

          If anyone discovers otherwise let me know
          Last I tried, you needed some minimal components but it worked after uninstalling 2015 and installing the standalone build tools.

          Comment


            #6
            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.

            Comment


              #7
              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.

              Comment


                #8
                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...

                Code:
                {
                	"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:

                Code:
                {
                	"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:

                Code:
                // 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:

                Code:
                {
                	"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
                		}
                	]
                }
                Last edited by TheJamsh; 08-09-2017, 09:02 AM.

                Comment


                  #9
                  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

                  Comment


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

                    This:
                    ECGame_RichTextBlock.cpp
                    Code:
                    	TAttribute<FText> TextBinding = OPTIONAL_BINDING(FText, Text);
                    Becomes:

                    ECGame_RichTextBlock.h
                    Code:
                    protected:
                    	PROPERTY_BINDING_IMPLEMENTATION(FText, Text);
                    ECGame_RichTextBlock.cpp
                    Code:
                    	TAttribute<FText> TextBinding = PROPERTY_BINDING(FText, Text);

                    Comment


                      #11
                      Originally posted by TheJamsh View Post
                      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...

                      Code:
                      {
                      	"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:
                      ...
                      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.
                      | Savior | USQLite | FSM | Object Pool | Sound Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        #12
                        Originally posted by BrUnO XaVIeR View Post
                        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.

                        Comment


                          #13
                          Hey all,

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

                          Unable to start the program 'C:\Program Files(x86)\Epic Games\UE_4.17\Engine\Intermediate\Build\Unused\UE4.exe'

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

                          EDIT:

                          Solved
                          https://forums.unrealengine.com/show...l=1#post748433
                          Last edited by ZioYuri78; 08-11-2017, 04:23 AM.
                          Join the Unreal Engine community on Reddit! | Twitter: @ZioYuri78

                          Comment


                            #14
                            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

                            Comment


                              #15
                              Originally posted by ZioYuri78 View Post
                              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?
                              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!

                              Comment

                              Working...
                              X