Forum Discussion
keithmarsh
11 years agoHonored Guest
0.3.1 Apr14 Doesn't compile
Hi
I had to modify //UE4Oculus/Engine/Plugins/OculusRift/Source/OculusRift/Private/OculusRiftRender.cpp and add the line
at the top or I got these errors (using VS2013) straight away
Keith
I had to modify //UE4Oculus/Engine/Plugins/OculusRift/Source/OculusRift/Private/OculusRiftRender.cpp and add the line
#include "IOculusRiftPlugun.h"
at the top or I got these errors (using VS2013) straight away
EXEC : error : All source files in module "OculusRift" must include the same precompiled header first. Currently "D:\UE4Merge\Engine\Plugins\OculusRift\Source\OculusRift\Public\IOculusRiftPlugin.h" is included by most of the source files. The following source files are not including "D:\UE4Merge\Engine\Plugins\OculusRift\Source\OculusRift\Public\IOculusRiftPlugin.h" as their first include: [D:\UE4Merge\Engine\Intermediate\ProjectFiles\QAGame.vcxproj]
D:\UE4Merge\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftRender.cpp (including D:\UE4Merge\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftHMD.h)
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V110\Microsoft.MakeFile.Targets(43,5): error MSB3073: The command "..\..\Build\BatchFiles\Rebuild.bat QAGameEditor Win64 Development" exited with code 1.
Keith
10 Replies
Replies have been turned off for this discussion
- cyberealityGrand ChampionInteresting. I'll see what I can find out.
- artyom17Expert ProtegeWhy did you modify the OculusRiftRender.cpp? That file (IOculusRiftPlugin.h) is included in OculusRiftHMD.h.
- keithmarshHonored GuestHi
Here are the steps to reproduce
1. Take a virgin Apr14QA UE4
2. Splat the content of ovr_ue4_0.3.1_src_QA_04_2014.zip over it
3. run GenerateProjectFiles.bat
4. build project UE4 using configuration Development Editor, Win64
5. if you build solution, every porject fails with this error
I've observed the error on two seperate Win8.1 x64 PCs. It thinks IOculusRiftPlugin.h is a precompiledheader file for some reason. I only added the #include to see if I could sidestep the error. - artyom17Expert ProtegeHmm... I can't reproduce it, it compiles fine for me....
Which version of Visual Studio do you use?
Please, verify that all files in Engine/Plugins/OculusRift were updated correctly, namely:
\UE4-QA\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftHMD.cpp
\UE4-QA\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftHMD.h
\UE4-QA\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftRender.cpp
\UE4-QA\Engine\Plugins\OculusRift\Source\OculusRift\Public\IOculusRiftPlugin.h
\UE4-QA\Engine\Plugins\OculusRift\Source\OculusRift\OculusRift.Build.cs
Remove the directory \UE4-QA\Engine\Plugins\OculusRift\Intermediate and rebuild (no need to rebuild whole solution, just use 'Build' on UE4 or QAGame targets). - keithmarshHonored GuestHi artyom17
I used VS2013 Pro and VS2013 Express, config Development Editor.
Hmm, odd. If I remove intermediate I get a compilation warning, and link errors
1>------ Build started: Project: UE4, Configuration: Development_Editor x64 ------
1>EXEC : warning : File 'E:\TS2Prototype\Engine\Plugins\OculusRift\Source\OculusRift\Private\OculusRiftRender.cpp' doesn't use same 'shared' precompiled header as other files in this module: 'Core.h' vs 'Engine.h'. This can greatly impact compile times. Make sure that your module's private PCH header includes the 'largest' shared PCH header that your module uses
1> Module.OculusRift.cpp
1> rc.exe PCLaunch.rc
1> link.exe UE4Editor-OculusRift.dll
1> Creating library E:\TS2Prototype\Engine\Plugins\OculusRift\Intermediate/Build/Win64\Dynamic\UE4Editor\Development\UE4Editor-OculusRift.lib and object E:\TS2Prototype\Engine\Plugins\OculusRift\Intermediate/Build/Win64\Dynamic\UE4Editor\Development\UE4Editor-OculusRift.exp
1>Module.OculusRift.cpp.obj : error LNK2001: unresolved external symbol "public: virtual bool __cdecl IHeadMountedDisplay::GetChromaAbCorrectionValues(class FVector4 &)const " (?GetChromaAbCorrectionValues@IHeadMountedDisplay@@UEBA_NAEAVFVector4@@@Z)
1>Module.OculusRift.cpp.obj : error LNK2001: unresolved external symbol "public: virtual float __cdecl IHeadMountedDisplay::GetDistortionScalingFactor(void)const " (?GetDistortionScalingFactor@IHeadMountedDisplay@@UEBAMXZ)
1>Module.OculusRift.cpp.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl IHeadMountedDisplay::GetDistortionWarpValues(class FVector4 &)const " (?GetDistortionWarpValues@IHeadMountedDisplay@@UEBAXAEAVFVector4@@@Z)
1>Module.OculusRift.cpp.obj : error LNK2001: unresolved external symbol "public: virtual float __cdecl IHeadMountedDisplay::GetLensCenterOffset(void)const " (?GetLensCenterOffset@IHeadMountedDisplay@@UEBAMXZ)
1>E:\TS2Prototype\Engine\Plugins\OculusRift\Binaries\Win64\UE4Editor-OculusRift.dll : fatal error LNK1120: 4 unresolved externals
1> -------- End Detailed Actions Stats -----------------------------------------------------------
1>ERROR : UBT error : Failed to produce item: E:\TS2Prototype\Engine\Plugins\OculusRift\Binaries\Win64\UE4Editor-OculusRift.dll
1> Cumulative action seconds (4 processors): 0.00 building projects, 29.04 compiling, 0.00 creating app bundles, 0.00 generating debug info, 0.78 linking, 0.00 other
1> UBT execution time: 40.64 seconds
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.MakeFile.Targets(38,5): error MSB3073: The command "..\..\Build\BatchFiles\Build.bat UE4Editor Win64 Development" exited with code -1.
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ========== - artyom17Expert ProtegeIt seems like you still don't have all the files up-to-date. At this moment I can tell that the file \UE4-QA\Engine\Source\Runtime\HeadMountedDisplay\Public\IHeadMountedDisplay.h is not updated. You need to decompress the ovr_ue4_0.3.1_src_QA_04_2014.zip again and VERIFY that all files were successfully updated. Then remove all Intermediate directories, re-generate projects and re-build everything.
- keithmarshHonored GuestHi
I've run WinMerge over the two and generated the attached csv report (sorry, forum won't let me attach HTML or XML). Everything looks ok - is the foldername from the zip correct? - keithmarshHonored GuestJust so we're on the same sheet, here's the copy of IHeadMountedDisplay.h I have. Is the 09/04/2014 ok?
- artyom17Expert ProtegeVery weird. The file is correct and as you can see the methods such as 'GetChromaAbCorrectionValues' are defined right in that header file and they can't be 'unresolved'. Something's wrong with your building system.
I again tried to take the clean QA, decompress the .zip into it, build it - everything went smooth, no issues.
Can you also redo everything again: grab the clean UE4-QA, uncompress the .zip, gen projects and build UE4 project, Development Editor config, Win64 platform? - keithmarshHonored GuestYou're right. Completely clean goes in no problem.
I'm trying to find where I went wrong. It might be because I backed-up Engine folder before the splat by copying to the same level.
Thanks for your time, and humble apologies for the red-herring.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 9 months ago