SDL Question On Windows

Hey need some advice here on this issue I’m having.
I have recently been trying to build this source code here https://www.libsdl.org/projects/doom/
I am building the original port with sdl infused with it not the linuxdoom port so i’m having some issues

What I have tried first…

Ive installed Mingw

Ive installed SDL v1.0.1

Ive set the enviroment varibles to the path of the SDL-Config file

And made sure I had make installed also basically I have everything

But when I load up the windows command prompt I locate the source directory

so for example cd C:\Users\john\Desktop\sdl doom source code

Then I use the command ls to see my files in that directory

Then I use the sh configure to start the configuring of the source code

But I get the sdl-config found but the sdl 1.0.1 is not found but I’m going to give you the info on the config-log to see my issue and the mingw command line info to see also i’m confused because I know that I need to add the path to the include directory of the sdl/sdl.h but I cant figure it out mabe its something else please help me out on this I have been stuck on this issue for 5 hours now its kinda bullsh*t but ow well…

Here is my command line info

loading cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… yes
checking for working aclocal… found
checking for working autoconf… found
checking for working automake… found
checking for working autoheader… found
checking for working makeinfo… found
checking whether make sets ${MAKE}… (cached) yes
checking for gcc… gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… yes
checking whether gcc accepts -g… yes
checking for a BSD compatible install… /usr/bin/install -c
checking for sdl-config… /c/Program Files (x86)/SDL_MINGW32/SDL-1.0.1/bin/sdl-config
checking for SDL - version >= 1.0.1… configure: line 1181: /c/Program: No such file or directory
configure: line 1182: /c/Program: No such file or directory
configure: line 1185: /c/Program: No such file or directory
configure: line 1187: /c/Program: No such file or directory
configure: line 1189: /c/Program: No such file or directory
no
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /c/Program Files (x86)/SDL_MINGW32/SDL-1.0.1/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!

Here is my config-log file that it generates to give more info on what the issue is…

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

configure:563: checking for a BSD compatible install
configure:616: checking whether build environment is sane
configure:673: checking whether make sets ${MAKE}
configure:719: checking for working aclocal
configure:732: checking for working autoconf
configure:745: checking for working automake
configure:758: checking for working autoheader
configure:771: checking for working makeinfo
configure:787: checking whether make sets ${MAKE}
configure:816: checking for gcc
configure:929: checking whether the C compiler (gcc ) works
configure:945: gcc -o conftest conftest.c 1>&5
configure:942:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main(){return(0);}
^
configure:971: checking whether the C compiler (gcc ) is a cross-compiler
configure:976: checking whether we are using GNU C
configure:985: gcc -E conftest.c
configure:1004: checking whether gcc accepts -g
configure:1047: checking for a BSD compatible install
configure:1142: checking for sdl-config
configure:1177: checking for SDL - version >= 1.0.1
configure:1259: gcc -o conftest -g -O2 conftest.c 1>&5
configure:1206:21: fatal error: SDL/SDL.h: No such file or directory
compilation terminated.
configure: failed program was:
#line 1201 “configure”
#include “confdefs.h”

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL/SDL.h>

char*
my_strdup (char *str)
{
char *new_str;

if (str)
{
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
}
else
new_str = NULL;

return new_str;
}

int main ()
{
int major, minor, micro;
char *tmp_version;

system (“touch conf.sdltest”);

/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup(“1.0.1”);
if (sscanf(tmp_version, “%d.%d.%d”, &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", “1.0.1”);
exit(1);
}

if (( > major) ||
(( == major) && ( > minor)) ||
(( == major) && ( == minor) && ( >= micro)))
{
return 0;
}
else
{
printf("\n*** ‘sdl-config --version’ returned %d.%d.%d, but the minimum version\n", , , );
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;
}
}

configure:1303: gcc -o conftest -g -O2 conftest.c 1>&5
configure:1296:21: fatal error: SDL/SDL.h: No such file or directory
compilation terminated.
configure: failed program was:
#line 1293 “configure”
#include “confdefs.h”

#include <stdio.h>
#include <SDL/SDL.h>

int main() {
return 0;
; return 0; }

So Whats the Issue that I am missing here thanks in advance… hope you guys can help me out on this one…

Oh gosh, does this actually need 1.0.1? If it needs SDL1 (and not SDL2), please try 1.2.15, which is the final version of the 1.x branch. It should be API compatible, but we’re talking about…maybe 10 years of development between those two versions, much of it improving compatibility with newer compilers and OSes.

1 Like

Okay I will try it but where do I need to set the path to the SDL/sdl.h so it will configure fine in the command line

Install 1.2.15 (configure, make, make install) and make sure the newly-installed’s sdl-config is in your PATH before that 1.0.1’s version.

(the specific error you’re having in your original post is that the configure script appears to be upset about directories with spaces in their name, so don’t install SDL to a directory under “C:\Program Files” regardless of the version you use.)

Good luck!

Thanks I will give this a try and let you know

which lines am i looking for to change them without spaces…

Here is my configure script to see for you to help me out

https://pastebin.com/QjjiJvSj

Hey I managed to get it to spit the makefile and configure but i ran into this issue now whats this

C:\Users\john\Desktop\sdl doom source code>make
makefile:163: warning: overriding commands for target .s.o' makefile:160: warning: ignoring old commands for target.s.o’
gcc -DPACKAGE=“sdldoom” -DVERSION=“1.10” -I. -I. -g -O2 -I/usr/local/cross-tools/i386-mingw32/include -I{prefix}/include/SDL-Dmain=SDL_main -c i_net.c
In file included from d_ticcmd.h:26:0,
from i_system.h:26,
from i_net.c:59:
doomtype.h:41:28: error: conflicting types for 'boolean’
typedef enum {false, true} boolean;
^
In file included from ./wtypes.h:8:0,
from ./winscard.h:10,
from ./windows.h:97,
from i_net.c:52:
./rpcndr.h:65:25: note: previous declaration of ‘boolean’ was here
typedef unsigned char boolean;
^
i_net.c:110:17: error: ‘IPPORT_USERRESERVED’ undeclared here (not in a function)
int DOOMPORT = (IPPORT_USERRESERVED +0x1d );
^
i_net.c: In function ‘PacketSend’:
i_net.c:183:30: warning: passing argument 2 of ‘sendto’ from incompatible pointer type [-Wincompatible-pointer-types]
c = sendto (sendsocket , &sw, doomcom->datalength
^
In file included from ./windows.h:92:0,
from i_net.c:52:
./winsock.h:302:34: note: expected ‘const char *’ but argument is of type 'doomdata_t * {aka struct *}'
WINSOCK_API_LINKAGE int WSAAPI sendto(SOCKET s,const char *buf,int len,int flags,const struct sockaddr *to,int tolen);
^
i_net.c: In function ‘PacketGet’:
i_net.c:204:29: warning: passing argument 2 of ‘recvfrom’ from incompatible pointer type [-Wincompatible-pointer-types]
c = recvfrom (insocket, &sw, sizeof(sw), 0
^
In file included from ./windows.h:92:0,
from i_net.c:52:
./winsock.h:297:34: note: expected ‘char *’ but argument is of type 'doomdata_t * {aka struct *}'
WINSOCK_API_LINKAGE int WSAAPI recvfrom(SOCKET s,char *buf,int len,int flags,struct sockaddr *from,int *fromlen);
^
make: *** [i_net.o] Error 1

C:\Users\john\Desktop\sdl doom source code>

Here is the proof of the configure that it worked

C:\Users\Relican\Desktop\sdl doom source code>sh configure
loading cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… yes
checking for working aclocal… found
checking for working autoconf… found
checking for working automake… found
checking for working autoheader… found
checking for working makeinfo… found
checking whether make sets ${MAKE}… (cached) yes
checking for gcc… gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… yes
checking whether gcc accepts -g… yes
checking for a BSD compatible install… /usr/bin/install -c
checking for sdl-config… /e/SDL-1.0.1/bin/sdl-config
checking for SDL - version >= 1.0.1… yes
updating cache ./config.cache
creating ./config.status
creating Makefile