[GH-ISSUE #491] Does not compile on Windows #100

Closed
opened 2026-02-27 21:04:34 +03:00 by kerem · 9 comments
Owner

Originally created by @sYnapZiX on GitHub (Aug 20, 2024).
Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/491

Hi, i'm unable to compile any branch of this emulator.

I have the latest Visual Studio 2022 with:

  • Desktop development with C++
  • C++ Clang Compiler for Windows (17.0.3)
  • MSBuild support for LLVM (Clang-cl) toolset

When i download and open any branch of the emulator, Visual Studio throws 32 errors:

	CMake Error: File G:/Downloads/shadPS4-bb-hacks/externals/fmt/src/common/scm_rev.cpp.in does not exist.					
	CMake Error at externals/CMakeLists.txt:30 (add_subdirectory):  The source directory G:/Downloads/shadPS4-bb-hacks/externals/discord-rpc does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:31 (target_include_directories):  Cannot specify include directories for target "discord-rpc" which is not built by this project.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:36 (add_subdirectory):  The source directory G:/Downloads/shadPS4-bb-hacks/externals/cryptoppwin does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:37 (target_include_directories):  Cannot specify include directories for target "cryptoppwin" which is not built by this project.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:52 (add_subdirectory):  The source directory G:/Downloads/shadPS4-bb-hacks/externals/ffmpeg-core  does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:53 (add_library): add_library cannot create ALIAS target "FFmpeg::ffmpeg" because target "ffmpeg" does not already exist.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:62 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/zlib-ng does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:63 (add_library): add_library cannot create ALIAS target "zlib-ng::zlib" because target "zlib" does not already exist.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:69 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/sdl3 does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:75 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/vulkan-headers does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:80 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/vma does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:99 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/glslang does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:101 (target_include_directories): Cannot specify include directories for target "SPIRV" which is not built by this project.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:106 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/robin-map does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:111 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/xbyak does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:116 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/magic_enum does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:121 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/toml11 does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:126 (add_library): No SOURCES given to target: xxhash	G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:126 (add_library): Cannot find source file: xxhash/xxhash.h

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt

	CMake Error at externals/CMakeLists.txt:135 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/zydis does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:140 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/winpthreads does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:141 (target_include_directories): Cannot specify include directories for target "winpthreads" which is not built by this project.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:145 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/sirit does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:147 (target_compile_options): Cannot specify compile options for target "sirit" which is not built by this project.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at externals/CMakeLists.txt:169 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/tracy does not contain a CMakeLists.txt file.		G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt	
	CMake Error at G:\Downloads\shadPS4-bb-hacks\CMakeLists.txt:598 (add_executable): add_executable cannot create target "shadps4" because another target with the same name already exists. The existing target is an executable created in source directory "G:/Downloads/shadPS4-bb-hacks/externals/fmt".  See documentation for policy CMP0002 for more details.	shadPS4	G:\Downloads\shadPS4-bb-hacks\CMakeLists.txt	
	CMake Error at externals/fmt/CMakeLists.txt:66 (configure_file): configure_file Problem configuring file	shadPS4	G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt	
	CMake Error at externals/fmt/CMakeLists.txt:109 (add_subdirectory): add_subdirectory given source "externals" which is not an existing directory.	shadPS4	G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt	
	CMake Error at externals/fmt/CMakeLists.txt:598 (add_executable): No SOURCES given to target: shadps4	shadPS4	G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt	
	CMake Error at externals/fmt/CMakeLists.txt:598 (add_executable): Cannot find source file: src/audio_core/sdl_audio.cpp

Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm
.ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90
.f95 .f03 .hip .ispc shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt

	CMake Error at externals/fmt/CMakeLists.txt:676 (add_subdirectory): add_subdirectory given source "G:/Downloads/shadPS4-bb-hacks/externals/fmt/src/video_core/host_shaders" which is not an existing directory.	shadPS4	G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt

Sorry for the odd formatting, this is how VS2022 spits it out. Needless to say that the project is unable to be compiled that way.
I've tried just the main branch, just the bb-hacks branch alone, and the main branch with the bb-hacks branch merged. Every possible combination yields the same result.

Originally created by @sYnapZiX on GitHub (Aug 20, 2024). Original GitHub issue: https://github.com/shadps4-emu/shadPS4/issues/491 Hi, i'm unable to compile any branch of this emulator. I have the latest Visual Studio 2022 with: - Desktop development with C++ - C++ Clang Compiler for Windows (17.0.3) - MSBuild support for LLVM (Clang-cl) toolset When i download and open any branch of the emulator, Visual Studio throws 32 errors: CMake Error: File G:/Downloads/shadPS4-bb-hacks/externals/fmt/src/common/scm_rev.cpp.in does not exist. CMake Error at externals/CMakeLists.txt:30 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/discord-rpc does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:31 (target_include_directories): Cannot specify include directories for target "discord-rpc" which is not built by this project. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:36 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/cryptoppwin does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:37 (target_include_directories): Cannot specify include directories for target "cryptoppwin" which is not built by this project. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:52 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/ffmpeg-core does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:53 (add_library): add_library cannot create ALIAS target "FFmpeg::ffmpeg" because target "ffmpeg" does not already exist. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:62 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/zlib-ng does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:63 (add_library): add_library cannot create ALIAS target "zlib-ng::zlib" because target "zlib" does not already exist. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:69 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/sdl3 does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:75 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/vulkan-headers does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:80 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/vma does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:99 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/glslang does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:101 (target_include_directories): Cannot specify include directories for target "SPIRV" which is not built by this project. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:106 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/robin-map does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:111 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/xbyak does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:116 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/magic_enum does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:121 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/toml11 does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:126 (add_library): No SOURCES given to target: xxhash G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:126 (add_library): Cannot find source file: xxhash/xxhash.h Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:135 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/zydis does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:140 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/winpthreads does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:141 (target_include_directories): Cannot specify include directories for target "winpthreads" which is not built by this project. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:145 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/sirit does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:147 (target_compile_options): Cannot specify compile options for target "sirit" which is not built by this project. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at externals/CMakeLists.txt:169 (add_subdirectory): The source directory G:/Downloads/shadPS4-bb-hacks/externals/tracy does not contain a CMakeLists.txt file. G:\Downloads\shadPS4-bb-hacks\externals/CMakeLists.txt CMake Error at G:\Downloads\shadPS4-bb-hacks\CMakeLists.txt:598 (add_executable): add_executable cannot create target "shadps4" because another target with the same name already exists. The existing target is an executable created in source directory "G:/Downloads/shadPS4-bb-hacks/externals/fmt". See documentation for policy CMP0002 for more details. shadPS4 G:\Downloads\shadPS4-bb-hacks\CMakeLists.txt CMake Error at externals/fmt/CMakeLists.txt:66 (configure_file): configure_file Problem configuring file shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt CMake Error at externals/fmt/CMakeLists.txt:109 (add_subdirectory): add_subdirectory given source "externals" which is not an existing directory. shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt CMake Error at externals/fmt/CMakeLists.txt:598 (add_executable): No SOURCES given to target: shadps4 shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt CMake Error at externals/fmt/CMakeLists.txt:598 (add_executable): Cannot find source file: src/audio_core/sdl_audio.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .ccm .cxxm .c++m .h .hh .h++ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt CMake Error at externals/fmt/CMakeLists.txt:676 (add_subdirectory): add_subdirectory given source "G:/Downloads/shadPS4-bb-hacks/externals/fmt/src/video_core/host_shaders" which is not an existing directory. shadPS4 G:\Downloads\shadPS4-bb-hacks\externals/fmt/CMakeLists.txt Sorry for the odd formatting, this is how VS2022 spits it out. Needless to say that the project is unable to be compiled that way. I've tried just the main branch, just the bb-hacks branch alone, and the main branch with the bb-hacks branch merged. Every possible combination yields the same result.
kerem closed this issue 2026-02-27 21:04:34 +03:00
Author
Owner

@raphaelthegreat commented on GitHub (Aug 20, 2024):

This should be solved by cloning recursively. Feel free to go to discord for such support requests as well

<!-- gh-comment-id:2298703626 --> @raphaelthegreat commented on GitHub (Aug 20, 2024): This should be solved by cloning recursively. Feel free to go to discord for such support requests as well
Author
Owner

@sYnapZiX commented on GitHub (Aug 20, 2024):

And what exactly means cloing recursively?

<!-- gh-comment-id:2298710938 --> @sYnapZiX commented on GitHub (Aug 20, 2024): And what exactly means cloing recursively?
Author
Owner

@sYnapZiX commented on GitHub (Aug 20, 2024):

Ok, thanks for NOT being helpful i guess...

<!-- gh-comment-id:2298732171 --> @sYnapZiX commented on GitHub (Aug 20, 2024): Ok, thanks for NOT being helpful i guess...
Author
Owner

@ygypt commented on GitHub (Aug 20, 2024):

Ok, thanks for NOT being helpful i guess...

bro its been like 10 minutes chilllllll

when you clone, do git clone --recursive and itll clone the shadps4 repo, +the "submodules", which are repos inside of repos

without resursive, you wont clone the inner repos and it cant compile

<!-- gh-comment-id:2298743729 --> @ygypt commented on GitHub (Aug 20, 2024): > Ok, thanks for NOT being helpful i guess... bro its been like 10 minutes chilllllll when you clone, do `git clone --recursive` and itll clone the shadps4 repo, +the "submodules", which are repos inside of repos without resursive, you wont clone the inner repos and it cant compile
Author
Owner

@sYnapZiX commented on GitHub (Aug 20, 2024):

Thank you very much for giving an actual helpful answer. Sorry for not being "chilllllll" but after my issue was closed mere seconds after opening it without any helpful comment given, i got slighty pissed which i think is understandable.

<!-- gh-comment-id:2298753160 --> @sYnapZiX commented on GitHub (Aug 20, 2024): Thank you very much for giving an actual helpful answer. Sorry for not being "chilllllll" but after my issue was closed mere seconds after opening it without any helpful comment given, i got slighty pissed which i think is understandable.
Author
Owner

@raphaelthegreat commented on GitHub (Aug 20, 2024):

The github isn't for support requests like this. And I gave you the solution in the comment, not sure what more you expected

<!-- gh-comment-id:2298758322 --> @raphaelthegreat commented on GitHub (Aug 20, 2024): The github isn't for support requests like this. And I gave you the solution in the comment, not sure what more you expected
Author
Owner

@sYnapZiX commented on GitHub (Aug 20, 2024):

Maybe a little bit more than a vague answer which doesn't really specify what to do for people that don't use GitHub on a daily basis.

Also it is an ISSUE as the code could not be compiled so it IS for requests like this.
Other people could potentially run into the same ISSUE and can find the answer here instead of potientially having to install an additional program that they may not even use (in this case Discord) and have to create an account and join a server for one simple information. Or even better yet, maybe update the instructions page with the information given so that other people don't even run into this ISSUE in the first place because Quote: 'it should just compile fine' doesn't really hold true if you don't know that information beforehand.

<!-- gh-comment-id:2298774737 --> @sYnapZiX commented on GitHub (Aug 20, 2024): Maybe a little bit more than a vague answer which doesn't really specify what to do for people that don't use GitHub on a daily basis. Also it is an ISSUE as the code could not be compiled so it IS for requests like this. Other people could potentially run into the same ISSUE and can find the answer here instead of potientially having to install an additional program that they may not even use (in this case Discord) and have to create an account and join a server for one simple information. Or even better yet, maybe update the instructions page with the information given so that other people don't even run into this ISSUE in the first place because Quote: 'it should just compile fine' doesn't really hold true if you don't know that information beforehand.
Author
Owner

@wheremyfoodat commented on GitHub (Aug 20, 2024):

https://letmegooglethat.com/?q=how+to+clone+recursively

<!-- gh-comment-id:2298776820 --> @wheremyfoodat commented on GitHub (Aug 20, 2024): https://letmegooglethat.com/?q=how+to+clone+recursively
Author
Owner

@raphaelthegreat commented on GitHub (Aug 20, 2024):

This isn't a half decade old emulation project, with detailed instructions for everything. Everything is still being built and documented. At this point if you don't know what recursive cloning is, you shouldn't be using the emulator imo. If you have more questions just seek help in the discord as I mentioned

<!-- gh-comment-id:2298782218 --> @raphaelthegreat commented on GitHub (Aug 20, 2024): This isn't a half decade old emulation project, with detailed instructions for everything. Everything is still being built and documented. At this point if you don't know what recursive cloning is, you shouldn't be using the emulator imo. If you have more questions just seek help in the discord as I mentioned
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shadPS4#100
No description provided.