0

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.

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • 2
    0xC0000135 means DLL not found. – 273K Dec 14 '22 at 16:01
  • This website is handy for windows error codes: [https://james.darpinian.com/decoder/?q=0xC0000135](https://james.darpinian.com/decoder/?q=0xC0000135) – drescherjm Dec 14 '22 at 16:27
  • Use this program to figure out what dlls are missing: [https://github.com/lucasg/Dependencies](https://github.com/lucasg/Dependencies) – drescherjm Dec 14 '22 at 16:41
  • If you are using MinGW I recommend switching to use msys2 to provide your MinGW and all of the open source libraries using its package manager pacman. This is a lot easier than manual downloading binaries and you will always have the correct binaries for your version of MinGW: [https://www.msys2.org/#installation](https://www.msys2.org/#installation) – drescherjm Dec 14 '22 at 16:52

0 Answers0