I have attempted to compile an SDL2 tutorial using emscripten found at this link: Text input tutorial
However, I encountered the following error:
error: unknown type name 'SDL_RendererFlip'; did you mean 'SDL_RendererFlags'?
error: use of undeclared identifier 'SDL_RenderCopyEx'
Despite including <SDL/SDL.h>
, I am puzzled as to why the compiler is unable to locate the enum and function.
The command line arguments used are:
emcc main.cpp -o main.html --preload-file files@/ -s USE_SDL=2 -s USE_SDL_IMAGE=2 -s SDL2_IMAGE_FORMATS=['bmp'] -s USE_SDL_TTF=2
The initial includes in the code are:
#include <SDL/SDL.h>
#include <SDL/SDL_image.h>
#include <SDL/SDL_ttf.h>
#include <emscripten.h>
#include <stdio.h>
#include <string>
#include <sstream>