Unreal Engine 4 create custom input device plugin - c++

I want create a custom plugin for Unreal Engine 4.
I have downloaded Unreal Engine 4.13 source code and I have followed this guide with success:
https://wiki.unrealengine.com/Custom_input_device_plugin_guide
I have compiled UE4 editor and running it I can see my plugin works fine.
Now I want to share my plugin with other people so I have copied my plugin folder (with all binaries) on the plugin folder (Engine\Plugins\Developer) on another PC where Unreal Engine 4.13 was installed using Epics Game launcher (so in this PC I don't have the source code of Unreal Engine but the release version installed on C:\Program Files x86....."
The problem is that when I launch some project I see the error message:
"MyPlugin.dll missing or build with a different engine version" and suggest me to build. I choose ok and clicking on "show log" I can read "Target is up to date". Then this window shutdown and I receive the error message that ask me to rebuild my plugin manually.
What's wrong?
Thanks in advance for any suggestion!

Can you try to put the plugin in your game project and let it compile?
I downloadd a plugin without Binaries, and got the same problem if I put it in Engine/Plugins, but it compiles fine in MyGameProject/Plugins.

Related

How to build&run Unreal C++ project on Linux?

I'm trying to build my first Unreal C++ project on Linux.
I built the engine from source in accordance with "Linux Quick Start" guide. Then I installed Qt Creator and followed the "How to Set up Qt Creator for UE4" guide.
I successfully set up and ran UE4Editor, and created a new C++ project. Unfortunately when I try running the project it complains:
And when I press "yes" this error message is shown:
Here's the error message from the logs:
ERROR: Building would modify the following engine files:
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Android/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/2D/Paper2D/Binaries/Linux/UE4Editor.modules
/media/redacted-disk/UnrealEngine/Engine/Plugins/AI/AISupport/Binaries/Linux/UE4Editor.modules
... many more
I tried rebuilding UE4 from IDE, then building again - but the error still persists. Same thing happens if I try starting UE4Editor from the engine files and opening the project from there.
What could cause this error? Why does it even try to rebuild the engine when I'm tring run a project?
I have the following script to add the paths to the engine scripts and binaries to my PATH:
UNREAL_HOME="/path/to/source/of/UnrealEngine"
UNREAL_SCRIPTS="${UNREAL_HOME}/Engine/Build/BatchFiles"
UNREAL_SCRIPTS_LINUX="${UNREAL_HOME}/Engine/Build/BatchFiles/Linux"
UNREAL_BINS="${UNREAL_HOME}/Engine/Binaries/Linux"
PATH="${PATH}:${UNREAL_BINS}:${UNREAL_SCRIPTS}:${UNREAL_SCRIPTS_LINUX}"
export PATH
Then I run UE4Editor '/absolute/path/to/project.uproject' from within the directory of my project.
I never create a project inside the source tree of the engine. Paths should absolutely be different.
I use VS-Code as the IDE. This is what works best from my experience. QT-Creator will work only if you create an include files with lots of #define that are missing from the .pro files created by unreal.
You can configure VS-Code to have an intelli-sense like completion by installing the C# and C/C++ extensions. I had to install mono in order to get OmniSharp working (this is the server than handles the autocompletion for VS-Code). Here is an extract of my VS-Code settings.json file:
"omnisharp.path": "/home/myuser/.vscode/extensions/ms-dotnettools.csharp-1.23.9/.omnisharp/1.37.6/omnisharp/OmniSharp.exe",
"omnisharp.monoPath": "/usr/bin/mono",
You can also install the C++ Helper extensions which is usefull for creating methods, classes, and so on.
In the directory of your project run 'make YOURPROJECTNAMEEditor', then you can run 'open YOURPROJECTNAME.uproject' and it should open.

Could not locate deviceQuery on my installation Cuda toolkit v7.5 on Windows 10

As I was going through installing Cuda v7.5 following this link http://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/#compiling-examples
I was not able to verify the installation as described in section 2.5. Verify the Installation. The reason was because I could not find deviceQuery program that should have been located in
C:\ProgramData\NVIDIA Corporation\CUDA Samples\v7.5\bin\win64\Release
Therefore, I could not run the deviceQuery for Cuda to be verified. Where is deviceQuery program located ? Is it still precompiled and deployed by the installation ?
Okay, so if you are a complete noob like me in using Visual Studio then you might be thrown off by the instruction "build the application first". Just watch this video to get an idea of how to build and run a project/program using VS.
https://www.youtube.com/watch?v=cL05xtTocmY
As soon as you open VS (I am using 15.6), you will be prompted to upgrade the SDK. Make sure to do so. If you've misclicked or skipped upgrading, you can go to the Project pull down menu and click "Retarget Solution" and click ok on the menu that appears. Then build and debug as shown in the video.
Creating the deviceQuery.exe file:
Go to the (default) directory C:\ProgramData\NVIDIA Corporation\CUDA Samples\v9.2\1_Utilities\deviceQuery. Just follow the procedure of running the MatMul file but this time build the deviceQuery_vs2017.sln file and debug it. Remember to retarget the solution.
No, it's not precompiled any more.
You have to compile (build) the application first, before you can run it.
That is true for all the CUDA samples now.
OK, I've had this problem with CUDA Toolkit 10 under Windows 10. In my case, I do never use the admin account, and the installation was done from the user account, entering the admin password when necessary. After repeated trials, here's what worked for me:
Make sure to uninstall any old version of CUDA and Visual Studio
(just to have a clean start)
Restart the computer
Install Microsoft Visual Studio Community Edition. During the
install, make sure to select the C++ Development tools
Restart
Install the Cuda Toolkit
Restart
With this, I had all the files. But the deviceQuery still would not compile because it was targeted to an older version of Windows. To compile it, one needs to 'Retarget' the project to the current windows SDK. However, this doesn't work out-of-the-box because the 'deviceQuery_vs2017.vcxproj' file is read-only for regular users.
So, there are two possible solutions:
Copy the folder to some place where you have write permission, or
(This is what I used, for convenience) Using Windows Explorer, navigate to the C:\ProgramData\NVIDIA Corporation directory. Right click on the 'CUDA Samples' directory, select 'Properties'. Under the 'Security' tab, click 'Edit' and add your user to it.
This way you can Retarget the solution in place. After that, I could open the solution in MS Visual Studio, Retarget it, build it and test it, and all worked fine.
Hope that helps.

Xcode fails to build unreal engine 4 project

So I'm trying to make a game using Unreal Engine 4 but I'm running into some issues.
Up until now I've been working on the Unreal Engine Editor only and it's been working just fine but when I started creating C++ classes and using Xcode as well, after trying to build it fails with an exit code 5 error. However that error is coming from the building of the editor itself, I have no idea how to make it only build my project and not the editor from the source.
Also, when i try to compile it from the Editor, it fails with an error saying that it failed to produce item :/Users...../UE4Editor.dylib
Any help would be appreciated.
If you have source control, you can do this.
1. BACK THIS UP
Roll back to a working copy.
Delete
/.vs
/Build
/Binaries
/DerivedDataCache
/Intermediate
/Saved
.xcode file
.db file
Click on the .uproject file, it will say to rebuild it. Press yes.
Open Unreal Engine
Right Click the .uproject file >> Services >> Generate XCode Project
Make your game :D

Intel Galileo and C++ REST SDK

I've successfully setup my Intel Galileo board (Gen 2) with the latest Windows IoT image (2/12/2014). I can boot the image without any issues, telnet into it and run a 'blink' application fine.
I've tried to run the 'Casablanca' sample and followed the instructions from http://ms-iot.github.io/content/Casablanca.htm. When I telnet into the Galileo board and try to run the console application I'm getting no output at all. When trying to debug from Visual Studio I can see the following output:
First-chance exception at 0x77CC342A (ntdll.dll) in WindowsIoTDemo.exe: 0xC0000139: Entry Point Not Found.
The program '[2016] WindowsIoTDemo.exe' has exited with code -1073741511 (0xc0000139) 'Entry Point Not Found'.
Has anyone been able to run the Casablanca sample application, or use the C++ REST SDK in a 'Windows for IoT' project at all?
I had the same problem when using the latest release of Casablanca, 2.3. In order to run the sample, I used Casablanca 2.2:
Since there doesn't appear to be a way to download the 2.3 source code from Codeplex, the only way I could see was to use Git:
git clone https://git01.codeplex.com/casablanca
git checkout 9cc7758d714b
At this point, you can follow the instructions in the Galileo sample to build cpprest120d_2_2.dll and copy it to the Galileo. Be sure to set the "No Enhanced Instructions" option.
Create a new project for the sample as directed, but don't use NuGet to install cpprestsdk. This will install the 2.3 version. Instead, you want to include the 2.2 version you built earlier...
Add the casablanca120.vcxproj project from your Git folder to your solution
In your sample project, add a Reference to the Casablanca DLL project: Project properties -> Common Properties -> References
Add the Casablanca 2.2 header folder to your sample project: Project properties -> Configuration Properties -> C/C++ -> General. Set the "Additional Include Directories" field to your-casablanca-folder\Release\include.
That's it - build and run.
Entry point not found error means there is a depending dll, in which some method is missing. To enable more diagnostic output, you can change registry key GlobalFlag=2 under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager. In my case the following methods is missing UnregisterClassW. This method is defined in User32.dll and if you compare User32.dll in you workstation Windows with the one in Galileo, you’ll see that these files are pretty much different.
You can find out on my blog how I fixed/workarounded the problem http://kardum.net/iot/intel-galileo-windows-application-azure-storage/

Code Signing Errors When Compiling C++ From Unreal Engine 4 in Xcode 5.1

I created a few C++ files in Unreal Engine 4, and imported the project in Xcode to compile the new files. When I attempt to build, it fails, giving me the following errors:
Code Sign error: No matching codesigning identity found: No codesigning identities (i.e. certificate and private key pairs) matching “iPhone Developer” were found.
CodeSign error: code signing is required for product type 'Application' in SDK 'iOS 7.1'
I do NOT have a paid iOS or Mac Developer license. I am doing this solely for hobby purposes at the moment, however, that shouldn't prevent me from compiling the code for Unreal, should it?
Any help would be greatly appreciated. Thank you.
EDIT: I am NOT trying to deploy to a device at the moment. All I am doing, is trying to compile a couple very small .cpp files that were created for UE4. The game engine cannot compile them, so it opened up a project in Xcode for me automatically.
EDIT 2: The project settings are already set to "Don't Code Sign".
Code Signing is required for building and deploying iOS apps on devices. If you're just building for the simulator, you don't need to code sign.
Change the project settings under Build Settings (click the project file and click "Build Settings along the top bar") from whatever the imported project has to Don't Code Sign.
I ran into this problem as well and found that the the first line within the project settings window has a drop down that is probably set to the UE4XcodeHelper target. If you click this, you will then see the main project as well as a number of targets. You need to navigate to each target, then the Code Signing section and make sure that 'Don't Code Sign' is set for each target. Then you can build without that interruption.