Can't Package Project in 4.16. Error C2061, C2504, C3646, C4430, C2614
Hello. I migrated my project from a gihub 4.14.1 branch to the new 4.16.1
It all works fine in the editor after fixing a bunch of old standard code. 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:
And before that it spits out a lot of errors related to the Procedural Midi plugin that my game uses.
Full Package Log link text
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 - https://github.com/Geromatic/Midi-Unreal
Procedural Midi Marketplace - https://www.unrealengine.com/marketplace/procedural-midi
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.
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?
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.
But I think that is something for another post.
answered Jun 26 '17 at 08:46 PM
The fault is in the plugin code, it's carelessly written with types used without including the necessary headers first. Unfortunately UE4's use of precompiled headers and unity builds can cause these errors to go unnoticed in certain contexts, though I'm surprised this made it through the marketplace build check as is.
I don't know details of what exactly is different between launcher and github engine builds, perhaps you have unity builds disabled? Otherwise maybe shared engine pchs are different in source builds.
Regardless, the only way this will be reliable under all conditions and in the future, is for the code to be cleaned up with explicit includes of the required headers.
answered Jun 26 '17 at 04:46 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here