I'm trying to use the SDL2_TTF library to render text in my application. My code compiles with no warnings or errors using GCC, but running through GDB produces this output:
[Thread 14488.0x369c exited with code 3221225781]
[Thread 14488.0x4f24 exited with code 3221225781]
[Thread 14488.0x2ab8 exited with code 3221225781]
During startup program exited with code 0xc0000135.
Here is my makefile:
OBJS = $(wildcard *.cpp)
CXX = g++
INCLUDE_PATHS = -ID:\VSCode\SDLDevTools\include\SDL2
#LIBRARY_PATHS specifies the additional library paths we'll need
LIBRARY_PATHS = -LD:\VSCode\SDLDevTools\lib
#COMPILER_FLAGS specifies the additional compilation options we're using
# -w suppresses all warnings
# -Wl,-subsystem,windows gets rid of the console window
COMPILER_FLAGS = -w -g #-Wl,-subsystem,windows <- remove comment in final ver
#LINKER_FLAGS specifies the libraries we're linking against
LINKER_FLAGS = -lmingw32 -lSDL2main -lSDL2 -lSDL2_ttf
#OBJ_NAME specifies the name of our exectuable
OBJ_NAME = main
#This is the target that compiles our executable
all : $(OBJS)
$(CXX) $(OBJS) $(INCLUDE_PATHS) $(LIBRARY_PATHS) $(COMPILER_FLAGS) $(LINKER_FLAGS) -o $(OBJ_NAME)
I've verified I didn't accidentally install the 32-bit version of SDL2_ttf (I reinstalled SDL2 and SDL2_ttf and tried to recompile, same issue). Not sure how I should proceed here - everything I've found points to the program not finding a DLL properly, but I looked and every DLL I need is in the /bin folder of my library path for SDL.
If it helps, I'm using VSCode as my editor and compiling everything using MinGW/GCC on the command line.