How to compile shaderglass with w64devkit?
- User
How to compile shaderglass with w64devkit?
- Assistant
To compile ShaderGlass using w64devkit, you'll need to follow these steps. The process will involve setting up the build environment, ensuring all dependencies are met, and configuring the build system appropriately.
Prerequisites
Before starting, make sure you have the following:
- w64devkit: Download and install from w64devkit GitHub repository.
- Visual Studio 2022: ShaderGlass requires some libraries and tools from the Windows SDK, which is typically included with Visual Studio.
- Windows SDK: Install the Windows 10 SDK (at least version 10.0.22000) if it's not already available.
- glslang: Required for shader compilation.
- Download from glslang GitHub.
- SPIR-V Cross Compiler: Needed for shader conversion.
- Download from SPIR-V Cross GitHub.
- Direct3D Shader Compiler (fxc.exe): Comes with the Windows SDK. Ensure it's installed and accessible in your PATH.
Steps to Compile ShaderGlass with w64devkit
1. Clone the ShaderGlass Repository
First, clone the ShaderGlass repository from GitHub:
bashgit clone https://github.com/mausimus/ShaderGlass.git cd ShaderGlass2. Set Up w64devkit Environment
Open the w64devkit terminal (included in the w64devkit installation) and ensure it's properly configured for building C++ applications.
bash# Verify the GCC version gcc --version # Verify make is available make --version3. Configure ShaderGlass Build
ShaderGlass is built using ISO C++20, so you need to ensure that w64devkit's GCC supports this standard. If not, you might need to update GCC.
Set up the
CXXFLAGSandLDFLAGSto include the necessary Windows SDK paths and libraries.bash - User
Makefile:18: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
- Assistant
The error occurs because Makefiles require tabs (not spaces) for indentation. Even a single line indented with spaces instead of a tab will cause the error. In your case, it seems that spaces were used where a tab was expected.
- User
I still get this error
- Assistant
- User
make: Nothing to be done for 'all'.
- Assistant
- User
D:/Work/ShaderGlass/ShaderGlass $ make -B g++ -o ShaderGlass.exe -LD:\WindowsSDK\Lib -ldxgi -ld3d11 -lgdi32 C:/Users/roma/Documents/w64devkit/bin/ld.exe: C:/Users/roma/Documents/w64devkit/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crtexewin.o):crtexewin.c:(.text.startup+0xb1): undefined reference to `WinMain' collect2.exe: error: ld returned 1 exit status make: *** [Makefile:12: ShaderGlass.exe] Error 1
- Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.