C++ 4.16 Transition Guide

Hi!

I’m facing weird issues in my 4.16 project. When I compile my code with the unreal editor opened (same project) visual studio failed compiling with this error:

error MSB3075: The command ““D:\Epic Games\UE_4.16\Engine\Build\BatchFiles\Build.bat” ZombieNanaEditor Win64 Development “D:\Proyectos\ZombieNana\ZombieNana.uproject” -waitmutex” exited with code 5. Please verify that you have sufficient rights to run this command.

However the editor is updated with the new changes and it’s working properly. Yes, it’s not a very important problem but it’s annoying.

Any Idea??

Thanks

Hey guys, so I have a problem when I package my project with 4.16.1, from the github code. It all worked just fine back in 4.14.

I am using a Procedural Midi Plugin, and it fails for that during packaging. Do note, that it builds and works properly when in editor.
I can launch the engine no problem, and run through my game in VR preview.

The issue comes when I wanted to package the game for the first time since I migrated my project. The log spits out the following error:


    [2017.06.24-15.05.03:451][767]UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: D:\UnrealEngine\UnrealEngine4-16\Engine\Plugins\MidiAsset\Procedural-Midi\MidiAsset\Binaries\Win64\MusicalRange-ProceduralAudio.lib

And before that it spits out a lot of errors related to the Procedural Midi plugin that my game uses.

Full Package Log PackageLog1.txt (58.8 KB)

Dropbox Link - Dropbox - PackageLog1.txt - Simplify your life

I got it from the github master branch. On the market place, the plugin claims to support 4.16. I am baffled by this as, the engine compiles fine for the editor.

Procedural Midi Github - GitHub - Geromatic/Midi-Unreal: Midi for Unreal Engine

Procedural Midi Marketplace - Procedural Midi in Code Plugins - UE Marketplace

I looked at this similar question, but I don’t know how that applies to the plugin. As there is one MidiAssetEditor.Build.Cs, but it’s the code is very similar to the one being used in my 4.14 version.

PackageLog1.txt (58.8 KB)

I also tried out what this post suggested, but I did not have any luck with that.

Anyone knows what is wrong and how I could fix this?

Also, I created a answer hub thread for this too. Since, I can’t keep moving with development at the moment.

I solved this issue by instead of having the ProceduralMidi plugin be engine installed, it is now installed on the project instead.

I had to change a bunch of cpp files to have the headers be on top (the *privatePCH,h header), which took some time but that did it.

Now, the lib that failed before does work and gets packaged. Now I am getting another packaging error.

LogLinker:Error: BPGC_ARCH_FOR_CDO_MusicalRangeBPFunctionLibrary_2 has an inappropriate outermost, it was probably saved with a deprecated outer (file: ../../../../../Dropbox/MusicalRange-4.16/Content/MusicShoot/Blueprints/BP_SongFinder.uasset)

So I am going to be trying to figure that out.

Same here, happen only with editor opened and if i compile from VS, no problem if i compile from the editor.

Not a problem because all still work and editor is updated but is a bit annoying for me.

From this line “… Win64 Development …” it seems it’s compiling without editor elements? You are using the Development Editor, win64 settings on VS?

a2344c8767.png

Yep, same like the picture.

MSB4011 Warning

Not sure if this is specific to the UE4.16 upgrade, or changing to VS2017 (from 2015), but after migrating for 4.16 my C++ project now gives me the MSB4011 warning;


1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\XXXXXXXXX\UnrealProjects\XXXXXXX\Intermediate\ProjectFiles\UE4.vcxproj]
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\XXXXXXXXX\UnrealProjects\XXXXXXX\Intermediate\ProjectFiles\XXXXXXX.vcxproj]
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\XXXXXXXXX\UnrealProjects\XXXXXXX\Intermediate\ProjectFiles\UE4.vcxproj]
2>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Cpp.props(31,3): warning MSB4011: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.Makefile.props" cannot be imported again. It was already imported at "C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.cpp.props (31,3)". This is most likely a build authoring error. This subsequent import will be ignored. [D:\XXXXXXXXX\UnrealProjects\XXXXXXX\Intermediate\ProjectFiles\XXXXXXX.vcxproj]

Has anyone else seen this? I’m still able to build my project successfully, but the warning is annoying.

Actually, I found that I could fix this dialog simply by making sure I didn’t have Steam running in the background. No need to change code. Just shut down steam client, then run your dedicated server.

I have a issue when opening a project from 4.15, tried to debug and breaks at:



Assertion failed: 0 [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\Linker.cpp] [Line: 60] 
Package level compression cannot be used with the async io scheme.


Anyone knows how to fix that?

**EDIT: ** the error was because of broken assets.

Hi everybody,

I have the following errors that occur and I do not understand where it comes from.

error CS1061: ‘System.Collections.Generic.List<string>’ ne contient pas une définition pour ‘add’ et aucune méthode d’extension ‘add’ acceptant un premier argument de type ‘System.Collections.Generic.List<string>’ n’a été trouvée (une directive using ou une référence d’assembly est-elle manquante ?)
error CS1061: ‘System.Collections.Generic.List<string>’ ne contient pas une définition pour ‘add’ et aucune méthode d’extension ‘add’ acceptant un premier argument de type ‘System.Collections.Generic.List<string>’ n’a été trouvée (une directive using ou une référence d’assembly est-elle manquante ?)
error CS1061: ‘System.Collections.Generic.List<string>’ ne contient pas une définition pour ‘add’ et aucune méthode d’extension ‘add’ acceptant un premier argument de type ‘System.Collections.Generic.List<string>’ n’a été trouvée (une directive using ou une référence d’assembly est-elle manquante ?)

Thanks for the help you can give me.

Can someone help me out. In my plugins old version it was using “Path.Combine(UnrealBuildTool.EngineDirectory.FullName” so that I could do the following:
PrivateIncludePaths.AddRange(
new string] {
“SteamVR/Private”,
“$(EngineDir)/Source/Runtime/Renderer/Private”,
“$(EngineDir)/Source/Runtime/VulkanRHI/Private”,
}
);

But now that UnrealBuildTool.EngineDirectory.FullName is protected I have no clue how to get those two sources??

Try this:



            string EngineDir = Path.GetFullPath(BuildConfiguration.RelativeEnginePath);

	    PrivateIncludePaths.AddRange(
				new string] {
                                           Path.Combine(EngineDir, @"Source/Developer/AssetTools/Private"), // Replace with whatever path you need.


I hope someone can help me ,I can load curve via no problem



                UPROPERTY(Category = SPF, EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
		class UCurveLinearColor* CurvLC;


but when I want to be hard coded with ConstructorHelpers::FObjectFinder in UE 4.16.2



        static ConstructorHelpers::FObjectFinder<UCurveLinearColor>CurveLC(TEXT("CurveLinearColor'/Game/CurveLC.CurveLC'"));
	CurvLC = CurveLC.Object;


give me error:
CompilerResultsLog:Error: Error f:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/ConstructorHelpers.h(109) : error C2664: ‘void ConstructorHelpers::ValidateObject(UObject *,const FString &,const TCHAR *)’: cannot convert argument 1 from ‘UCurveLinearColor *’ to ‘UObject *’
CompilerResultsLog:Error: Error f:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/ConstructorHelpers.h(109) : note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
CompilerResultsLog:Error: Error f:\Program Files\Epic Games\UE_4.16\Engine\Source\Runtime\CoreUObject\Public\UObject/ConstructorHelpers.h(102) : note: while compiling class template member function ‘ConstructorHelpers::FObjectFinder<UCurveLinearColor>::FObjectFinder(const TCHAR *)’
CompilerResultsLog:Error: Error f:\Unreal Projects\CppSPF\Source\CppSPF\Cp.cpp(27) : note: see reference to function template instantiation ‘ConstructorHelpers::FObjectFinder<UCurveLinearColor>::FObjectFinder(const TCHAR *)’ being compiled
CompilerResultsLog:Error: Error f:\Unreal Projects\CppSPF\Source\CppSPF\Cp.cpp(27) : note: see reference to class template instantiation ‘ConstructorHelpers::FObjectFinder<UCurveLinearColor>’ being compiled

I included

#include “UObject/ConstructorHelpers.h”
#include “Kismet/GameplayStatics.h”

In 4.14 and 4.15 worked fine

Thx in advance

PS: I just try with float Curve and its working, but LinearColor don’t work ,and of course…Because i didn’t

#include “Curves/CurveLinearColor.h”

and now it’s working :slight_smile:

I found that we had to remove the “using UnrealBuildTool” and ten put

UnrealBuildTool.

in front of some variales. E.g.



// Fill out your copyright notice in the Description page of Project Settings. 


public class UnfortunateSpacemenTarget : UnrealBuildTool.TargetRules 
{
	public UnfortunateSpacemenTarget(UnrealBuildTool.TargetInfo Target) : base(Target)
	{
		Type = TargetType.Game; 
		ExtraModuleNames.Add("UnfortunateSpacemen");
	}
}


That’s definitely not right, it’s working just fine for us without that.

Sorry my bad. removed

When I try to run the project after switching engine versions and it starts building the modules, where does it save the log? It has an error and auto closes the window after a while before I have time to read what the problem is. It’s not the Target/ModuleRules stuff I already fixed that.

It doesn’t work for my project, it still reports error when package.
Have you ever try to package your project?

Thanks! it really works.

Help! Trying to build the plugin with a custom engine. its 4.16 engine rebuilt to a dedicated server.