简体   繁体   中英

Exporting SDL2 Game into Windows from visual studio

i have created a fully working game using C++ / SDL2 , SDL2_image , SDL2_ttf and SDL2_mixer , the whole game is written in visual studio and now my goal is to export it from the IDE , so i can bassicaly play it anywhere , without using the IDE and compiling it , but i know that all files like SDL2.dll and SDL2_image.dll or how is it called are needed to be in the debug folder to compile it in the IDE properly , how can i just move the file game.exe to my usb and play it properly , is it true that all i need is compiled .exe from IDE and SDL .dlls and audio/images ? can someone explain it to me ? because i guess if the game is already done it is stupid to keep it in the IDE... thanks

SDL is a shared library, so you'll have to include the SDL2.dll and any other dynamic libraries with your release executable, unless you choose to statically link them into a standalone executable. You can set all these options (as well as selecting the active build profile to "Release" vs "Debug") in your build options. To select the active build profile, click the "Build > Configuration Manager" menu option. To edit the build profiles, simply go to your project settings and select the active Configuration from the top left dropdown menu in the project settings dialog.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM