/SDL2-Template

Primary LanguageC++MIT LicenseMIT

SDL2-Template

Source:

For Windows (x64):

Download Msys2 msys2-x86_64 https://github.com/msys2/msys2-installer/releases/download/2023-07-18/msys2-x86_64-20230718.exe

Install and run Msys2 as administrator

pacman -S mingw-w64-x86_64-toolchain cmake --noconfirm

Command to Build, Install and Run

# only run this line the first time
cmake -G "MinGW Makefiles" -S . -B bin/debug/

# run these everytime after made changes and to execute the project
cmake --build bin/debug/ && start /b bin/debug/SDL2_Template.exe

# or Run the `windows_build.bat` batch script to build and start the project on windows
.\windows_build.bat

For error

the procedure entry point _zst28 thow bad array new lenthw could not be located in dynamic link library

Please copy file libstdc++-6.dll and put it next to the exe file Could found it at msys64\mingw64\bin

For Linux (Ubuntu specific):

sudo apt-get install -y \
    g++ cmake libsdl2-2.0 libsdl2-dev \
    libsdl2-image-dev

git clone https://github.com/aderayevans/SDL2-Template.git

cd SDL2-Template

chmod +x ubuntu_build

Command to Build, Install and Run

# only run this line the first time
cmake -S . -B bin/debug/

# run these everytime after made changes and to execute the project
sudo cmake --build bin/debug/ && bin/debug/SDL2_Template

# or
./ubuntu_build