So i loaded anc compiled everything. But when i run without debugging it gives me an error. If i press debug anyway, A red screen pops up. when i go back to my code I see: #include ^ with the red squiggles here what does this mean? it says: "SDL2/SDL.h: No such file or directorygcc" but ive clicked the include paths quick fix and everything. It runs and can be compiled, but I dont wanna see it having this Ghost error. What do I do?
@@SonarSystemsCoUk with your tutorial, i spent a while making sure every single step was followed, im guess there's just some weird problem with vscode and it ackowledging the include or something
yes but i have an even stranger include error with Vs code and it does not go away even if I go to my laptop and do the whole process over again... Includes are hard... @@alejandroreyes2926
The tutorial doesn't cover connecting SDL to the run button. You gotta run the program either through the console with 'make' then './main' (to run) or by navigating to the .exe in windows and manually clicking it.
sorry for commenting here, from your tutorial video of setup of SDL2 i used this in terminal g++ -I src/include -L src/lib -o main main.cpp -lmingw32 -lSDL2main -lSDL2 and i am getting error like this showing undefined reference to every function c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0x26): undefined reference to `SDL_Init' pp:(.text+0xaa): undefined reference to `SDL_RenderClear' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xd6): undefined reference to `SDL_SetRenderDrawColor' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xf2): undefined reference to `SDL_RenderDrawPoint' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xfe): undefined reference to `SDL_RenderPresent' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0x10a): undefined reference to `SDL_Delay' collect2.exe: error: ld returned 1 exit status please help me with this
So i loaded anc compiled everything. But when i run without debugging it gives me an error. If i press debug anyway, A red screen pops up.
when i go back to my code I see:
#include
^
with the red squiggles here
what does this mean? it says: "SDL2/SDL.h: No such file or directorygcc"
but ive clicked the include paths quick fix and everything.
It runs and can be compiled, but I dont wanna see it having this Ghost error.
What do I do?
how did you setup SDL?
@@SonarSystemsCoUk with your tutorial, i spent a while making sure every single step was followed, im guess there's just some weird problem with vscode and it ackowledging the include or something
Did you ever get it to work?
yes but i have an even stranger include error with Vs code and it does not go away even if I go to my laptop and do the whole process over again... Includes are hard...
@@alejandroreyes2926
The tutorial doesn't cover connecting SDL to the run button. You gotta run the program either through the console with 'make' then './main' (to run) or by navigating to the .exe in windows and manually clicking it.
sorry for commenting here, from your tutorial video of setup of SDL2
i used this in terminal g++ -I src/include -L src/lib -o main main.cpp -lmingw32 -lSDL2main -lSDL2
and i am getting error like this showing undefined reference to every function
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0x26): undefined reference to `SDL_Init'
pp:(.text+0xaa): undefined reference to `SDL_RenderClear'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xd6): undefined reference to `SDL_SetRenderDrawColor'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xf2): undefined reference to `SDL_RenderDrawPoint'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0xfe): undefined reference to `SDL_RenderPresent'
c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\DASARI~1\AppData\Local\Temp\cc0nk7a2.o:main.cpp:(.text+0x10a): undefined reference to `SDL_Delay'
collect2.exe: error: ld returned 1 exit status
please help me with this
UA-cam deleted my other comment. Basically make sure you have 'make' installed.
Thompson Kevin Clark Dorothy Thompson Kenneth