C++ Header file cannot be found during build

The error:

[ 523/2753] cxx (win_x64_vs2015|profile): Gems\EMotionFX\Code\EMotionFX\CommandSystem\Source\MotionSetCommands.cpp -> BinTemp\win_x64_vs2015_profile\Gems\EMotionFX\Code\EMotionFX\CommandSystem\Source\MotionSetCommands.cpp.109.objMain.cppc:\Lumberyard\1.12.0.1\dev\Code\Launcher\LumberyardLauncher.h(13): fatal error C1083: Cannot open include file: 'AzGameFramework/Application/GameApplication.h': No such file or directoryBuild failed<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>Compilation failed - File: 'Main.cpp.2104.obj', Module: 'MyGameWindowsLauncher', Configuration: 'win_x64_vs2015|profile', error code 2 Input Files: 'c:\Lumberyard\1.12.0.1\dev\Code\Launcher\WindowsLauncher\Main.cpp' Output Files: 'c:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Launcher\WindowsLauncher\Main.cpp.2104.obj' Command: 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\amd64\CL.exe /nologo /W3 /WX /MP /Gy /GF /Gm- /fp:fast /Zc:wchar_t /Zc:forScope /Gd /wd4530 /wd4351 /Ox /Ob2 /Ot /Oi /Oy- /FS /Wv:18 /bigobj /showIncludes /MD /Z7 /GR- /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Launcher\WindowsLauncher /Ic:\Lumberyard\1.12.0.1\dev\Code\Launcher\WindowsLauncher /Ic:\Lumberyard\1.12.0.1\dev\Code\SDKs\boost /Ic:\Lumberyard\1.12.0.1\dev\Code\CryEngine\CryCommon /Ic:\Lumberyard\1.12.0.1\dev\Code\Launcher /Ic:\Lumberyard\1.12.0.1\dev\Gems\EMotionFX\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\AWS\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CloudCanvasCommon\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CloudGemFramework\v1\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\ScriptCanvas\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\GraphCanvas\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\SceneProcessing\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\LyShine\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\HttpRequestor\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\LegacyGameInterface\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CryLegacy\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\Maestro\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CameraFramework\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\InputManagementFramework\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\Gestures\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CertificateManager\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\StartingPointMovement\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\GameLift\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\StartingPointCamera\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\InAppPurchases\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\ChatPlay\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\Metastream\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\LyShineExamples\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\CryEntityRemoval\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\LmbrCentral\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\MyGame\Gem\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Gems\ScriptCanvas\Code /Ic:\Lumberyard\1.12.0.1\dev\Gems\ScriptCanvas\Code /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Gems\ScriptCanvas\Code\Include\ScriptCanvas /Ic:\Lumberyard\1.12.0.1\dev\Gems\ScriptCanvas\Code\Include\ScriptCanvas /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Gems\ScriptCanvas\Code\Editor\Include /Ic:\Lumberyard\1.12.0.1\dev\Gems\ScriptCanvas\Code\Editor\Include /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Gems\ScriptCanvas\Code\Include /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Gems\ScriptCanvas\Code\117 /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Framework\AzFramework /Ic:\Lumberyard\1.12.0.1\dev\Code\Framework\AzFramework /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Framework\GridMate /Ic:\Lumberyard\1.12.0.1\dev\Code\Framework\GridMate /Ic:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Framework\AzCore /Ic:\Lumberyard\1.12.0.1\dev\Code\Framework\AzCore /IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE /IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE /IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt /IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um /IC:\Program Files (x86)\Windows Kits\8.1\include\shared /IC:\Program Files (x86)\Windows Kits\8.1\include\um /IC:\Program Files (x86)\Windows Kits\8.1\include\winrt /Ic:\Lumberyard\1.12.0.1\dev\Code\SDKs\rapidjson\include /Ic:\Lumberyard\1.12.0.1\dev\Code\SDKs\rapidxml /Ic:\Lumberyard\1.12.0.1\dev\Code\SDKs\Lua /Ic:\Lumberyard\1.12.0.1\dev\Code\SDKs\zlib-common\include /D_WIN32 /D_WIN64 /DCODE_BASE_FOLDER="c:/Lumberyard/1.12.0.1/dev/Code/" /D_PROFILE /DPROFILE /DNDEBUG /DSCRIPTCANVAS_ERRORS_ENABLED /DBINFOLDER_NAME="Bin64vc140" /DPLATFORM_SUPPORTS_AWS_NATIVE_SDK /DUSE_WINDOWS_DLL_SEMANTICS /DLY_BUILD=532402 /D_MT /D_DLL /DAZ_ENABLE_TRACING /DAZ_ENABLE_DEBUG_TOOLS /DLY_GAMEFOLDER="MyGame" /DLY_GAMEDLL="MyGame" /DEXE_VERSION_INFO_0=1 /DEXE_VERSION_INFO_1=12 /DEXE_VERSION_INFO_2=0 /DEXE_VERSION_INFO_3=1 c:\Lumberyard\1.12.0.1\dev\Code\Launcher\WindowsLauncher\Main.cpp /c /Fo c:\Lumberyard\1.12.0.1\dev\BinTemp\win_x64_vs2015_profile\Code\Launcher\WindowsLauncher\Main.cpp.2104.obj' Output: Main.cpp c:\Lumberyard\1.12.0.1\dev\Code\Launcher\LumberyardLauncher.h(13): fatal error C1083: Cannot open include file: 'AzGameFramework/Application/GameApplication.h': No such file or directory<++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++>
  • I have confirmed this file exists (in dev/Code/Framework/AzGameFramework/AzGameFramework/Application)

  • The error occurs consistently, even after running clean and after deleting the BinTemp directory

  • None of the editor, asset processor, project configurator or setup assistant are running at the time of compilation

  • The build command is lmbr_waf.bat build_win_x64_vs2015_profile -p game

  • This occurs when building 1.12.0.1 (editor+game) while an installation of 1.12.0.0 is present. Deleting the entire 1.12.0.0 directory fixes the error. This would indicate to me that the two versions interfere with each other. However, I’ve successfully compiled before with multiple versions installed, so I don’t know that this is related. Even if this is the problem, it seems extremely fragile that LY cannot figure out where it is running from- AzGameFramework isn’t one of the includes passed to this command; this seems like it could cause a problem. However, I have no idea how deleting the other LY directory could possibly change the build command which was being issued.Any ideas on a fix? Keeping around only a single version is fine by me but there is no obvious indication that this is caused by interference from the other version;

Hi @yuriy000,

That indeed seems strange. Can you describe the directory layout for the versions? Where was each version of Lumberyard stored relative to each other? Did you anything custom to your PATH related to Lumberyard?

Apologies for the delayed response – let me gather some answers on this for ya :slight_smile: stay tuned!

This seems like a registry related issue. Lumberyard does store things like path to the dev folder in registry. Most likely they were still pointing at the 1.12.0.0 version causing the confusion. Deleting it then effectively forced a refresh.

I’ll send this ahead for investigation. In the meantime, sticking to one version seems like the cleanest path forward.

Both versions were in C:/Lumberyard' (so 1.12.0.0 was inC:/Lumberyard/1.12.0.0’ and 1.12.0.1 was in `C:/Lumberyard/1.12.0.1’).

Nothing was done to PATH specifically for Lumberyard. For completeness, here is its value:

C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\Program Files (x86)\ConEmu\ConEmu\Scripts;C:\Program Files (x86)\ConEmu;C:\Program Files (x86)\ConEmu\ConEmu;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Users\Owner\AppData\Local\Atlassian\SourceTree\git_local\mingw32\bin\Git LFS;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Common Files\Autodesk Shared;C:\Program Files (x86)\Autodesk\Backburner;C:\Program Files\Git\cmd;C:\Users\Owner\AppData\Roaming\local\bin;C:\Users\Owner\AppData\Local\Microsoft\WindowsApps;C:\Program Files\emacs\bin;C:\cygwin64\bin;C:\Program Files\Git\bin;C:\Program Files\Aspell\bin;C:\Home\path

Also, I got this behaviour from both cygwin bash and from the Windows command prompt.