SDL2 error while compiling dethrace source!
I have followed all steps, in main page, git clone, mkdir, build, etc.. but i still get those errors, how can i solve?
- Download and extract
SDL2-devel-2.30.11-VC.zipfrom libsdl-org/SDL somewhere - Configure dethrace's CMake project with
-DCMAKE_PREFIX_PATH=path/to/where/you/extracted/the/folder - Build dethrace
- Copy SDL2.dll from the the devel archive (copy the correct architecture: 32-bit vs 64-bit) to the folder where you built dethrace.exe (both files are needed when playing the game)
- play the game (by copying dethrace.exe and SDL2.dll to the game data), or running the executable with a
DETHRACE_ROOT_DIRenvironment variable set
Do i need to copy exe and dll to my source? Or what
Do i need to copy exe and dll to my source? Or what
If you have a dethrace.exe, that means you have successfully built dethrace.
When running the game, you need both dethrace.exe and SDL2.dll in the same location.
I just have zip with compiled game What i need is to compile the game itself
May I suggest to try to follow this SDL2 CMake tutorial? https://www.youtube.com/watch?v=jkmDBZzchbQ
Building dethrace is 100% similar (SDL2 is the only external dependency)
Can you tell me what is the error 233? In screen that i posted
Can you tell me what is the error 233? In screen that i posted
dethrace's build script (=CMake) cannot find SDL2: we need a SDL2 library and the SDL2 headers.
CMake allows building dethrace inside Visual Studio SDL2 allows to do windows, keyboard, mouse, ... in a platform independent way
The tutorial I sent will show what needs to be configured for CMake to detect SDL2.
I have got an PERL_EXECUTABLE error. How do i fix?
With Visual Studio you can use vcpkg and install dependencies from there.
Sei italiano? vcpkg è il gestore delle dipendenze che in genere si utilizza con Visual Studio per facilità d'uso (sarà in grado di trovare tutte le dipendenze che installi con vcpkg).
- Scarica ed installa
Git for Windows: https://git-scm.com/downloads/win; - Installa
vcpkg(per esempio in C:\ ) da PowerShell:
git clone https://github.com/microsoft/vcpkg
cd vcpkg
.\bootstrap-vcpkg.bat -disableMetrics
.\vcpkg integrate install
- Installa le dipendenze:
.\vcpkg install --triplet=x64-windows sdl2
Ad ogni modo questa porta sorgente attualmente funziona male... ho un PC discreto ma il gioco va a scatti, la velocità della visuale sembra legata agli fps (ho uno schermo 144 Hz) ma non riesco a limitare gli fps in modo regolare. La versione Windows 95 con cnc-ddraw (https://github.com/FunkyFr3sh/cnc-ddraw) per il momento funziona meglio.
And this?
And this?
Cancella tutto e segui la guida che ho scritto sopra. NON devi scaricare e compilare SDL2 manualmente, puoi farlo tramite vcpkg.
Ti consiglio di utilizzare la versione di cmake integrata in Visual Studio, tramite interfaccia utente.
Se invece preferisci usare la versione da linea comando, avvia un'istanza del prompt dei comandi per gli sviluppatori dal Terminale Windows ed esegui:
cmake --toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake -A x64 -B build
cmake --build build --config Release
I've installed StrawberryPerl on my system.
@jeff-1amstudios Can we make the Perl dependency optional, add pre-generated files to the repo, and let cmake automatically regenerate when the source changes?
i am in game, but crash here
That's a legitimate bug. This needs a va_start and va_end before and after the call.
Our BRender fork is getting a major update ATM, so perhaps this has already been fixed by Jeff.
Unless you know how to fix this, I'd suggest to run the game in Release mode.
Where i have to put va_start and va_end? Which lines
Where i have to put va_start and va_end? Which lines
Questo è l'eseguibile compilato con Visual Studio 2022 + vcpkg: dethrace.zip
Se vuoi seguire i miei consigli, riuscirai a far funzionare il gioco, altrimenti buona fortuna.
Fixed from myself Thanks anyway