Closed ZehCastro closed 1 year ago
https://github.com/microsoft/Xbox-GDK-Samples/blob/66c576245e5d260a05756686290f9b8953612023/Samples/Tools/CMakeExample/Desktop/CMakeGDKDesktop.cmake#L99
This yields an error: LINK : fatal error LNK1181: cannot open input file 'xgameruntime.lib gameinput.lib'
LINK : fatal error LNK1181: cannot open input file 'xgameruntime.lib gameinput.lib'
Do notice that it wrapped those libs in quotes in the generated linker command:
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\ZEH\GDK\2022.10--GDKX--SamplesOnly\GDKSamples\Tools\CMakeExample\Desktop\out\bin\Gaming.Desktop.x64\Debug\CMakeExampleDesktop.exe" /INCREMENTAL /ILK:"CMakeExampleDesktop.dir\Debug\CMakeExampleDesktop.ilk" /NOLOGO /LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/gameKit/Lib/amd64" /LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/gameKit/Lib/amd64/Debug" /LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/ucrt/x64" /LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/ucrt/x64/Debug" /LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64" /LIBPATH:"C:/Program Files (x86)/Windows Kits/10/Lib/10.0.19041.0/um/x64/Debug" /LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/ExtensionLibraries/Xbox.Services.API.C/DesignTime/CommonConfiguration/Neutral/Lib/Release/v142" /LIBPATH:"C:/ZEH/GDK/221001/Microsoft GDK/221001/GRDK/ExtensionLibraries/Xbox.Services.API.C/DesignTime/CommonConfiguration/Neutral/Lib/Release/v142/Debug" dxguid.lib d3d12.lib dxgi.lib "xgameruntime.lib gameinput.lib" libHttpClient.142.GDK.C.lib Microsoft.Xbox.Services.142.GDK.C.lib appnotify.lib winhttp.lib crypt32.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/ZEH/GDK/2022.10--GDKX--SamplesOnly/GDKSamples/Tools/CMakeExample/Desktop/out/bin/Gaming.Desktop.x64/Debug/CMakeExampleDesktop.pdb" /SUBSYSTEM:WINDOWS /LTCG /LTCGOUT:"CMakeExampleDesktop.dir\Debug\CMakeExampleDesktop.iobj" /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/ZEH/GDK/2022.10--GDKX--SamplesOnly/GDKSamples/Tools/CMakeExample/Desktop/out/bin/Gaming.Desktop.x64/Debug/CMakeExampleDesktop.lib" /MACHINE:X64 /machine:x64 /CETCOMPAT /IGNORE:4075 CMakeExampleDesktop.dir\Debug\cmake_pch.obj CMakeExampleDesktop.dir\Debug\Game.obj CMakeExampleDesktop.dir\Debug\DeviceResources.obj CMakeExampleDesktop.dir\Debug\Main.obj
Replacing it with this, fixed the issue for me: list(APPEND Console_Libs gameinput.lib)
list(APPEND Console_Libs gameinput.lib)
Ops, just noticed this is already fixed here.
https://github.com/microsoft/Xbox-GDK-Samples/blob/66c576245e5d260a05756686290f9b8953612023/Samples/Tools/CMakeExample/Desktop/CMakeGDKDesktop.cmake#L99
This yields an error:
LINK : fatal error LNK1181: cannot open input file 'xgameruntime.lib gameinput.lib'
Do notice that it wrapped those libs in quotes in the generated linker command:
Replacing it with this, fixed the issue for me:
list(APPEND Console_Libs gameinput.lib)