Problems to recompile a UE4 plugin - plugins

I am trying to recompile the Dialogo System plugin (https://forums.unrealengine.com/t/dialogue-system/44974) and I can't do it at all. I've tried several ways, including those suggested by the forum staff, but there's no way
This the error message I am getting:
Running C:/Program Files/Epic
Games/UE_4.26/Engine/Binaries/DotNET/UnrealBuildTool.exe Development
Win64 -Project="D:/Simulation/unreal/MyProject/MyProject.uproject"
-TargetType=Editor -Progress -NoEngineChanges -NoHotReloadFromIDE Invalidating makefile for MyProjectEditor (DialogueSystem.Build.cs
modified) #progress push 5% Parsing headers for MyProjectEditor
Running UnrealHeaderTool
"D:\Simulation\unreal\MyProject\MyProject.uproject"
"D:\Simulation\unreal\MyProject\Intermediate\Build\Win64\MyProjectEditor\Development\MyProjectEditor.uhtmanifest"
-LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -abslog="C:\Users\renat\AppData\Local\UnrealBuildTool\Log_UHT.txt" -installed Reflection code generated for MyProjectEditor in 4,3286771 seconds #progress pop
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTComposite_Context.cpp(1):
error: Expected BTComposite_Context.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTComposite_Question.cpp(1):
error: Expected BTComposite_Question.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTComposite_QuestionGroup.cpp(1):
error: Expected BTComposite_QuestionGroup.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTContextNode_Interface.cpp(1):
error: Expected BTContextNode_Interface.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTDialogueFunctionLibrary.cpp(1):
error: Expected BTDialogueFunctionLibrary.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTTask_CloseDialogue.cpp(1):
error: Expected BTTask_CloseDialogue.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTTask_ShowPhrases.cpp(1):
error: Expected BTTask_ShowPhrases.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\BTTask_WaitAnswer.cpp(1):
error: Expected BTTask_WaitAnswer.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\DialogueButton.cpp(1):
error: Expected DialogueButton.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\DialogueEventListener.cpp(1):
error: Expected DialogueEventListener.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\DialogueSettings.cpp(1):
error: Expected DialogueSettings.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\DialogueSystemModule.cpp(1):
error: Expected DialogueSystemModule.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Private\QuestBook.cpp(1): error: Expected QuestBook.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\BehaviorTreeEditor\QuestionCustomization.cpp(1):
error: Expected QuestionCustomization.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\BehaviorTreeEditor\ShowPhrasesCustomization.cpp(1):
error: Expected ShowPhrasesCustomization.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\QuestBookEditor\QuestBookEditor.cpp(1):
error: Expected QuestBookEditor.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\QuestBookEditor\QuestBookEditorCommands.cpp(1):
error: Expected QuestBookEditorCommands.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\QuestBookEditor\QuestBookEditorCustomization.cpp(1):
error: Expected QuestBookEditorCustomization.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\DialogueSystemEditorModule.cpp(1):
error: Expected DialogueSystemEditorModule.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\DialogueSystemStyle.cpp(1):
error: Expected DialogueSystemStyle.h to be first header included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\QuestBookAssetTypeActions.cpp(1):
error: Expected QuestBookAssetTypeActions.h to be first header
included.
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystemEditor\Private\QuestBookFactory.cpp(1):
error: Expected QuestBookFactory.h to be first header included.
Building MyProjectEditor... Using Visual Studio 2019 14.27.29111
toolchain (C:\Program Files (x86)\Microsoft Visual
Studio\2019\Community\VC\Tools\MSVC\14.27.29110) and Windows
10.0.19041.0 SDK (C:\Program Files (x86)\Windows Kits\10). Building 13 actions with 12 processes... #progress 'Compiling C++ source
code...' 0% #progress 'Compiling C++ source code...' 8% [1/13]
Default.rc2 #progress 'Compiling C++ source code...' 15% [2/13]
Default.rc2 #progress 'Compiling C++ source code...' 23% [3/13]
PCH.DialogueSystem.cpp
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Classes\BTTask_ShowPhrases.h(7):
fatal error C1083: It1s not possible to open file include: 'Widget.h':
No such file or directory
Please, some help. I really need to use this plugin to produce a demonstration of my project.

You could try what the log is suggesting and change the order of the includes. I suppose you're using a c++ project. Sometimes the order does matter.
Also check if the plugin is added in the dependecies list in the build.cs file. This file is located inside your project source folder. You will see that in the file there is already a dependecies list and you should include the plugin name in the list and build again.

BTComposite_Context.cpp(1): error: Expected BTComposite_Context.h to be first header included.
Taking this one as an example it looks like the .cpp files have been either corrupted or modified in a way. In general when you have a .cpp file you'll want it to start with the same header file as the first include. So open one of these files and see whether or not it starts with something like
#include BTComposite_Context.h
My guess since it looks to be an old plugin it probably improperly starts with something like
#include Engine/Core.h
D:\Simulation\unreal\MyProject\Plugins\UE4-DialogueSystem-master\Source\DialogueSystem\Classes\BTTask_ShowPhrases.h(7): fatal error C1083: It1s not possible to open file include: 'Widget.h': No such file or directory
This error is actually what's causing you not to be able to compile. Likely because Widget.h has been moved in a future version of UE4 compared to what it was when this plugin was made almost 7 years ago.
Try changing from #include Widget.h to #include "Components/Widget.h"
If you look at Widget.cpp in the engine source you can see this is now the correct include path that is expected.

Related

What causes xcode Swift error "Build input file cannot be found: ... OptimizationProfiles/myproj.profdata"

After importing to my Swift project a .c and .h files, I now get error:
error: Build input file cannot be found:
'/Users/me/project/OptimizationProfiles/myProject.profdata'
Project built just fine before importing.
What I've tried...
Restarted Mac and Xcode, and did realclean beforehand. Still same error.
If Bridging header is empty, gets error.
If I add
#include "my.h"
to Bridging header, it gets error.
If I start from new, empty Xcode project, import works okay and no build errors.

Swift build error_if_any_output_files_are_specified_they_all_must_be

When converting to use the new build system on Xcode 10, I get the following error in my output for several of my extension targets.
<unknown>:0: error: if any output files are specified, they all must be
Command CompileSwift failed with a nonzero exit code
I have looked for a solution online, but the only reference I can find to this error is in the Swift compiler source code itself.
https://www.google.com/search?q=error_if_any_output_files_are_specified_they_all_must_be
Does anyone know how this error is actually triggered, or what I can do to fix it?
Ok, I had the same problem with one of our projects. Building or Archiving are always stopped with the error <unknown>:0: error: if any output files are specified, they all must be.
The solution for us was to set Compilation Mode to Incremental instead of Whole Module.
This means, you have to ignore the Validate Project Settings warning:

Progress developer studio - ignore error checking include files

In Progress Developer Studio (Eclipse):
How do you set up the project so it won't "compile" (check for errors) in .i (include) files separately?
Now we get a lot of errors because include files can not be run on its own. For example some variables that are used in the .i file are defined in p/w file - that will generate an error.
By default includes are not compiled. The errors shown on include files are caused by other sources (.cls, .p, .w) that failed to compile on that include.
See also : knowledgebase.progress.com/articles/Article/000048421

mex compiler could not find include path in .h files

Hi I'm using MEX in Matlab.
The c code uses boost and a lot of headers are included.
And at first my problem is like this
>>mex readTrackletsMex.cpp
readTrackletsMex.cpp
e:\kitti\tools\devkit\matlab\tracklets.h(7) : fatal error C1083: can not open include file:“boost/serialization/nvp.hpp”: No such file or directory
This is because the include path is not specified. So I copied the headers into "/include/boost/XX" and added "-I" flag.
This time it seems that the compiler cannot find the include path in one of the header file.
>> mex -Iinclude readTrackletsMex.cpp
readTrackletsMex.cpp
include\boost/serialization/nvp.hpp(21) : fatal error C1083: can not open include file:“boost/config.hpp”: No such file or directory
Any idea on this? How do I specify a "global" include path for the compiler?
Thanks for your time.
You could try adding the include paths to the environment variables C_INCLUDE_PATH and CPLUS_INCLUDE_PATH. The other issue may be that you put in -Iinclude, and not -I/include

Compiling/using libjpeg in Windows for Eclipse

This question/answer will eventually serve as complete answer for this question: How can I manipulate/rotate a JPEG image in C++? Since the answers given to that question are only useful if you have already done all of this below.
I followed the guide here: Compiling libjpeg
(The accepted answer guide using MINGW32 Shell)
It doesn't work despite having downloaded a fresh copy:
$ make
make all-am
make[1]: Entering directory `/c/tmp/jpeg-9'
CC jaricom.lo
CC jcapimin.lo
jcapimin.c:127:1: error: conflicting types for 'jpeg_suppress_tables'
jcapimin.c:128:1: note: an argument type that has a default promotion can't matc
h an empty parameter name list declaration
In file included from jcapimin.c:22:0:
jpeglib.h:997:14: note: previous declaration of 'jpeg_suppress_tables' was here
make[1]: *** [jcapimin.lo] Error 1
make[1]: Leaving directory `/c/tmp/jpeg-9'
make: *** [all] Error 2
8d and 9 both do the same.
After making the change noted in this question: Compile libjpeg with mingw
Add the following definition to the jconfig.h
#define HAVE_PROTOTYPES 1
I get this output when making:
$ make
make all-am
make[1]: Entering directory `/c/tmp/jpeg-9'
CC jaricom.lo
In file included from jinclude.h:20:0,
from jaricom.c:17:
jconfig.h:5:24: warning: extra tokens at end of #undef directive [enabled by def
ault]
CC jcapimin.lo
In file included from jinclude.h:20:0,
from jcapimin.c:21:
jconfig.h:5:24: warning: extra tokens at end of #undef directive [enabled by def
ault]
jcapimin.c:127:1: error: conflicting types for 'jpeg_suppress_tables'
jcapimin.c:128:1: note: an argument type that has a default promotion can't matc
h an empty parameter name list declaration
In file included from jcapimin.c:22:0:
jpeglib.h:997:14: note: previous declaration of 'jpeg_suppress_tables' was here
make[1]: *** [jcapimin.lo] Error 1
make[1]: Leaving directory `/c/tmp/jpeg-9'
make: *** [all] Error 2
Then you have to run "autoheader" to fix this and make again.
It supposedly made but there is nothing in my build directory set by ./configure --prefix=/c/tmp/jpeg-9-build/
I found the libjpeg-9.dll in the .lib folder within the project directory.
Messy..Now the question is: How do I use it in Eclipse?
I have the exe's in the main directory, some exe's and the DLL in the .lib sub-directory but no .lib file - How do I go about importing these into an eclipse project so that I can call functions in the DLL?
$ make install gathered the files in the build directory.
I migrated the contents of the build directory into the working Eclipse project and linked the library and include paths:
I'm not sure if this is right for how I want to use it but it's something and it compiles. Next part: Calling functions out of the DLL?
Related to using compiled jpegtran.exe: jpegtran.exe not correctly rotating image
Trying to use libraries and compile in separate project: Need help compiling jpegtran.c code from libjpeg
Current issue: Need help compiling jpegtran.c code from libjpeg
Your advice for updating the jconfig.h file to #define HAVE_PROTOTYPES 1 is only a band-aid solution for a deeper problem: jconfig.h is corrupted and has incorrect #undef for many important items your compiler supports.
The proper way to work around this is to follow the install.txt advice to manually compile ckconfig.c and have it generate a jconfig.h for you, then proceed to make, and make install.