-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sdl-vscode-c-cpp-debug/ #4
Comments
Please extract the part where you mentioned sdl files in the path c:\sdl2. What to do with duplicate files? For example, there is a bin folder in the mixer, but when extracting, it is mixed with another bin folder. |
Hi @HassanChobaki24 ! Just merge those folders. In the end, for example, your c:\sdl2\bin should contain:
Happy coding! |
I followed the steps yet get the "SDL2/SDL.h: No such file or directory" error even though this file does exist. I wish I could provide more information, but I really don't what might be causing this. Maybe I did the environment variable incorrectly, but I double checked. My SDL file path is as follows "C:\sdl2\include\SDL2\SDL.h" |
Seems that your editor is not using the correct build for Windows. Please try these steps:
Best regards. |
Yeah, I ran the windows build and it gives me the no such file or directory error, |
Daniel John, thank you for spending your precious time on my pointless
questions. Apparently my vscode doesn't work. I hate IDEs too. I'm
currently working with the cxxdroid program for mobile phones!!! So that
such problems can be solved in the future
…On Wed, 10 Jul 2024, 07:51 Daniel Cañizares Corrales, < ***@***.***> wrote:
Seems that the editor is not using the correct build for Windows. Please
try the following:
1. Run manually the file build-win.bat
<https://github.com/TheScienceOfCodeEDU/sdl-vscode-c-cpp/blob/main/build-win.bat>
.
2. That should work, if so double check that your editor is running
the build process for Windows.
image.png (view on web)
<https://github.com/TheScienceOfCode/discussions/assets/5238966/c4606321-1a15-4d76-a26a-ad7def8d5874>
Best regards.
—
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BFBBMP3V2PH56NQYXW5RDA3ZLSZDZAVCNFSM6AAAAABKE6SSEGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJZGUYTQOBQHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @Axelsmoon, Please try this: Open your main.cpp and replace lines 13 to 19 from this: #ifdef _WIN64
#include <SDL.h>
#include <SDL_image.h>
#else
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#endif To this: #include <SDL.h>
#include <SDL_image.h> Now it should compile for Windows. Probably a flag is missing somewhere on your system (or you're using WIN32 instead of WIN64), I'm not sure since I cannot access your machine, but that should do the trick. Note: That disables Linux/Mac compilation. |
Hi everyone! We have updated the tutorial and we've added a link with all SDL files for Windows, ready to be extracted on your computer's root folder C:\. Just in case, here is the link. Happy coding! |
Thanks for the tutorial! I have added the /Y flag to the xcopy option under windows to avoid typing 'A' all the time. The only thing that doesn't work is autocompletion so I will have to look into that! |
Hi @breinbaas ! This setup has auto-completion out-of-the-box. Please double check that you had all required extensions enabled. If you find any fixes, please feel free to send a PR to our repo https://github.com/TheScienceOfCodeEDU/sdl-vscode-c-cpp Best regards! |
SDL on VSCode with C/C++
This practical guide shows a complete setup to configure VSCode for videogame programming with SDL2 and C/C++. Installation of additional libraries such as SDL Image, SDL Mixer and SDL TTF is also covered by this tutorial.
https://thescienceofcode.com/sdl-vscode-c-cpp-debug/
The text was updated successfully, but these errors were encountered: