[Attempting to compile SRB2 SDL2 Build] SDL2 Path Issues

Status
Not open for further replies.
I'm having path issues with SDL2. For some reason, MinGW can't locate the SDL2 files. I do have the files in the right location though. I want to compile the SDL2 version of SRB2, but it fails to cause it says SDL.h not found. No files are missing. I've pasted my sdl2-config into the code tab below. My operating system is Windows 10. I have MinGW installed at the default location. I've done a lots of screwing around in the sdl2-config file to attempt to fix the issue. I've got the latest version with the latest patch of SDL2 by the way.

Code:
#!/bin/sh

prefix=/C/MinGW
exec_prefix=${prefix}
exec_prefix_set=no
libdir=${exec_prefix}/lib

#usage="\
#Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs]"
usage="\
Usage: $0 [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--cflags] [--libs] [--static-libs]"

if test $# -eq 0; then
      echo "${usage}" 1>&2
      exit 1
fi

while test $# -gt 0; do
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case $1 in
    --prefix=*)
      prefix=$optarg
      if test $exec_prefix_set = no ; then
        exec_prefix=$optarg
      fi
      ;;
    --prefix)
      echo $prefix
      ;;
    --exec-prefix=*)
      exec_prefix=$optarg
      exec_prefix_set=yes
      ;;
    --exec-prefix)
      echo $exec_prefix
      ;;
    --version)
      echo 2.0.3
      ;;
    --cflags)
      echo -I${prefix}/include/SDL2  -Dmain=SDL_main
      ;;
    --libs)
      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows
      ;;
    --static-libs)
#    --libs|--static-libs)
      echo -L${exec_prefix}/lib  -lmingw32 -lSDL2main -lSDL2  -mwindows  -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -XCClinker -static-libgcc
      ;;
    *)
      echo "${usage}" 1>&2
      exit 1
      ;;
  esac
  shift
done
 
Last edited:
I take it you're using Makefiles to compile. If that's the case, try reverting your sdl2-config to the version you had before downloading the patch mentioned in the article. That patch was intended to restore functionality on Windows 7, so 8 and above likely break when its applied.
 
I take it you're using Makefiles to compile. If that's the case, try reverting your sdl2-config to the version you had before downloading the patch mentioned in the article. That patch was intended to restore functionality on Windows 7, so 8 and above likely break when its applied.
Thanks, but my internet is currently down so I won't be on the message boards a lot until I get internet again. Also, setting C:/MinGW/msys/1.0/bin as a path fixed the issue for me.
 
Status
Not open for further replies.

Who is viewing this thread (Total: 0, Members: 0, Guests: 0)

Back
Top