1

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.
WideLuke
  • 11
  • 3
  • 1
    open up a dev cmd prompt and see if you can run rc? If not you know what the problem is. Alternatively `vcpkg env` will give you the environment vcpkg uses to build. You can also use `--debug` to see the invocations vcpkg does. – Alexander Neumann Mar 14 '22 at 18:18
  • I'm able to run rc so that's all fine. I went into the vcpkg environment and used --debug, which then showed this: ```[DEBUG] Feature flag 'binarycaching' unset, [DEBUG] Feature flag 'manifests' unset, [DEBUG] Feature flag 'compilertracking' unset, [DEBUG] Feature flag 'registries' unset, [DEBUG] Feature flag 'versions' unset``` – WideLuke Mar 14 '22 at 18:39
  • The important part is if it shows: ``` [DEBUG] command line: cmd /c "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.31.31103 amd64 2>&1 – Alexander Neumann Mar 14 '22 at 19:20
  • It didn't show that, but I executed ```cmd /c "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.31.31103 amd64 2>&1 – WideLuke Mar 14 '22 at 20:25
  • `vcpkg env --debug` has to show the vcvarsall call otherwise your environment is not getting setup correctly. – Alexander Neumann Mar 14 '22 at 21:16
  • What does ´vcpkg.exe version´ show? – Alexander Neumann Mar 14 '22 at 21:18
  • I ran vcpkg env --debug and it does show ```[DEBUG] command line: cmd /c "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary/Build\vcvarsall.bat" -vcvars_ver=14.31.31103 amd64 2>&1 – WideLuke Mar 14 '22 at 21:34
  • I also can't seem to see vcpkg.exe version... not sure if I'm just not looking hard enough but there's a lot of text in my command prompt. – WideLuke Mar 14 '22 at 21:35
  • No you just type in ´vcpkg.exe version´ in the command prompt and should get a response like: ´Vcpkg package management program version 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e´ – Alexander Neumann Mar 14 '22 at 22:04
  • This is what 'vcpkg.exe version' shows: ```Vcpkg package management program version 2022-03-09-1affd32f93b299d5a907816c328ca3ededb73a7e``` – WideLuke Mar 14 '22 at 22:35

0 Answers0