UPDATE: I attempted some more fixes, which involved installing some new components for visual studio community 2022. However, that didn't work and googling my issue further just brought up conflicting posts regarding RC.exe not being found and CMAKE not working. I'm pretty sure CMAKE is running, because it seems to run everything before failing when attempting to run the ninja -v command. I've been picking at this issue on and off for the last 48 hours with no progress, but I'd really like to get VCPKG working so fingers crossed I can figure out or find a solution.
I've been spending most of the day trying to resolve an issue I have with VCPKG which has caused me to hit a bit of a brick wall with my progress. I used 'git clone' to get a fresh copy of VCPKG onto my computer and I have done a fresh install of Visual Studio Community 2022, however I still run into the same error that I had using Visual Studio Community 2019 when installing a library or dependency using VCPKG. Below I'll post the error log and hopefully that can help showcase the kind of error I'm getting, it seems to be some kind of pathing error with ninja.
After trying to come up with multiple solutions and fixes I just can't seem to get rid of the error, I've tried switching to different versions visual studio along with trying to install different libraries and dependencies. I've also tried fixing the pathing issues through the environment variables, but nothing worked.
This error also appears no matter what library or dependency I try to install, but I basically just want VCPKG to work so I can install libraries and dependencies for my VS Community 2022 project.
Change Dir: C:/src/vcpkg/buildtrees/boost-exception/x64-windows-dbg/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_5c808 && [1/2] Building CXX object CMakeFiles\cmTC_5c808.dir\CMakeCXXCompilerABI.cpp.obj
[2/2] Linking CXX executable cmTC_5c808.exe
FAILED: cmTC_5c808.exe
cmd.exe /C "cd . && C:\src\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_5c808.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1431~1.311\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_5c808.dir\CMakeCXXCompilerABI.cpp.obj /out:cmTC_5c808.exe /implib:cmTC_5c808.lib /pdb:cmTC_5c808.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_5c808.dir/manifest.res CMakeFiles\cmTC_5c808.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.
Determining if the CXX compiler works failed with the following output:
Change Dir: C:/src/vcpkg/buildtrees/boost-exception/x64-windows-dbg/CMakeFiles/CMakeTmp
Run Build Command(s):C:/Program Files/Microsoft Visual Studio/2022/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/Ninja/ninja.exe cmTC_b5aef && [1/2] Building CXX object CMakeFiles\cmTC_b5aef.dir\testCXXCompiler.cxx.obj
[2/2] Linking CXX executable cmTC_b5aef.exe
FAILED: cmTC_b5aef.exe
cmd.exe /C "cd . && C:\src\vcpkg\downloads\tools\cmake-3.22.2-windows\cmake-3.22.2-windows-i386\bin\cmake.exe -E vs_link_exe --intdir=CMakeFiles\cmTC_b5aef.dir --rc=rc --mt=CMAKE_MT-NOTFOUND --manifests -- C:\PROGRA~1\MICROS~3\2022\COMMUN~1\VC\Tools\MSVC\1431~1.311\bin\Hostx64\x64\link.exe /nologo CMakeFiles\cmTC_b5aef.dir\testCXXCompiler.cxx.obj /out:cmTC_b5aef.exe /implib:cmTC_b5aef.lib /pdb:cmTC_b5aef.pdb /version:0.0 /machine:x64 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
RC Pass 1: command "rc /fo CMakeFiles\cmTC_b5aef.dir/manifest.res CMakeFiles\cmTC_b5aef.dir/manifest.rc" failed (exit code 0) with the following output:
The system cannot find the file specified
ninja: build stopped: subcommand failed.