C:\Users\Ceset\Desktop\Pong\include\..\FGE\fge_collision.h||In function 'bool fge_CollisionDetector(SDL_Texture*, SDL_Texture*)':|
C:\Users\Ceset\Desktop\Pong\include\..\FGE\fge_collision.h|17|error: invalid use of incomplete type 'SDL_Texture {aka struct SDL_Texture}'|
C:\SDL 2.0.0\include\SDL2\SDL_render.h|127|error: forward declaration of 'SDL_Texture {aka struct SDL_Texture}'|
C:\Users\Ceset\Desktop\Pong\include\..\FGE\fge_collision.h|17|error: invalid use of incomplete type 'SDL_Texture {aka struct SDL_Texture}'|
C:\SDL 2.0.0\include\SDL2\SDL_render.h|127|error: forward declaration of 'SDL_Texture {aka struct SDL_Texture}'|
.//same error all over
.//same error all over
.//same error all over
.//same error all over
||=== Build finished: 24 errors, 11 warnings (0 minutes, 1 seconds) ===|
You need to show more than this. For one thing your error messages seem to point exclusively at header files, which you haven't shown.
It appears you've not actually defined SDL_Texture anywhere, but we can't know for sure what's wrong without more information.
@keskiverto if i did not misunderstand you meant add #include <SDL2/SDL_render.h> to the fge_includes.h file right?
i did as you told(which did not make sense to me because SDL.h already includes these headers) and it gives the same error. if you meant sth else can you give a little further info?
What we need to see is the header that declares or defines SDL_Texture. It appears that you've forward declared it somewhere, so you could use a pointer to it, but the real declaration has not yet been seen by the compiler.
Can you include the file with the declaration of struct SDL_Texture or class SDL_Texture, and show us said file if you can.
hmm. this is a sdl library header that declares it. so when i added SDL.h it should also be added. and of course SDL_Texture should be declared.
and it is sure that SDL is not the one fault here so maybe i m making a usage mistake about SDL_Texture or an algorithm mistake. wiki doesnt have much info but let me make some tests. i will come up with more info and maybe with the solution
¿who told you that a texture has an `x' field?
Keep in mind that it is an OO approach codified in C. So you call methods passing around the `this' pointer.