VOGONS

Common searches


First post, by Xenphor

User metadata
Rank Member
Rank
Member

I've been refering to the wiki on how to build dosbox but am having some trouble. I got mingw and msys and downloaded the latest source for dosbox as well as SDL. Now, according to the wiki http://www.dosbox.com/wiki/BuildingDOSBox, it says that you shouldn't have to compile the SDL and could just use one that is already built from a prebuilt version of dosbox. I tried that but I kept getting this error in Msys:

checking for sdl-config... no
checking for SDL - version >= 1.2.0... no
*** The sdl-config script installed by SDL could not be found
*** If SDL was installed in PREFIX, make sure PREFIX/bin is in
*** your path, or set the SDL_CONFIG environment variable to the
*** full path to sdl-config.
configure: error: *** SDL version 1.2.0 not found!

As you can see, it appears to be looking for a sdl-config file which I could not find at all. In the wiki it says to adjust the path variable to where the SDL is installed which I tried to do in a variety of ways, but none were successful.

So I decided to just compile SDL and that gave me an sdl-config file in local/bin. When I went to compile again, the ./configure worked correctly (it detected the sdl-config) but during the make I got a whole bunch of errors related to SDL. Here is just a small part of what it said:

' with no type
/usr/local/include/SDL/SDL_video.h:401: error: ISO C++ forbids declaration of `h
' with no type
/usr/local/include/SDL/SDL_video.h:438: error: expected `,' or `...' before '*'
token
/usr/local/include/SDL/SDL_video.h:438: error: ISO C++ forbids declaration of `U
int16' with no type
/usr/local/include/SDL/SDL_video.h:449: warning: `SDL_GetGammaRamp' initialized
and declared `extern'
/usr/local/include/SDL/SDL_video.h:449: error: `Uint16' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:449: error: `red' was not declared in this sc
ope
/usr/local/include/SDL/SDL_video.h:449: error: `Uint16' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:449: error: `green' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:449: error: `Uint16' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:449: error: `blue' was not declared in this s
cope
/usr/local/include/SDL/SDL_video.h:449: error: initializer expression list treat
ed as compound expression
/usr/local/include/SDL/SDL_video.h:492: error: `Uint32' does not name a type
/usr/local/include/SDL/SDL_video.h:499: error: `Uint32' does not name a type
/usr/local/include/SDL/SDL_video.h:506: warning: `SDL_GetRGB' initialized and de
clared `extern'
/usr/local/include/SDL/SDL_video.h:506: error: variable or field `SDL_GetRGB' de
clared void
/usr/local/include/SDL/SDL_video.h:506: error: `Uint32' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:507: error: expected primary-expression befor
e "const"
/usr/local/include/SDL/SDL_video.h:508: error: `Uint8' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:508: error: `r' was not declared in this scop
e
/usr/local/include/SDL/SDL_video.h:508: error: `Uint8' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:508: error: `g' was not declared in this scop
e
/usr/local/include/SDL/SDL_video.h:508: error: `Uint8' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:508: error: `b' was not declared in this scop
e
/usr/local/include/SDL/SDL_video.h:508: error: initializer expression list treat
ed as compound expression
/usr/local/include/SDL/SDL_video.h:513: warning: `SDL_GetRGBA' initialized and d
eclared `extern'
/usr/local/include/SDL/SDL_video.h:513: error: variable or field `SDL_GetRGBA' d
eclared void
/usr/local/include/SDL/SDL_video.h:513: error: `Uint32' was not declared in this
scope
/usr/local/include/SDL/SDL_video.h:514: error: expected primary-expression befor
e "const"

I'm not sure if this is because something went wrong when I compiled SDL or what.

It seems like the easiest way to do this would be to use the already built SDL in dosbox, but as I said before it kept on looking for that sdl-config file instead. Is there a way to override this and have msys point to the .dll directly? Or is there something else I can try with the SDL I compiled on my own?

Reply 1 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

The wiki is wrong. You need at least the development libraries of SDL from http://www.libsdl.org/download-1.2.php (grab the ones for mingw) or you need to compile SDL yourself. I don't know who wrote this in such a way, since you *need* SDL headers and libs present in your mingw/msys to compile Dosbox.
I hope it will work with the development libraries for you, though I suspect there is something else wrong with your mingw/msys stuff, since you should be able to build SDL on your own with that.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 2 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

Well I tried again with no success. As far as I can tell, SDL compiles correctly, creating a file called "local" in the msys directory with the sub-directories bin, include, lib, and share; in bin is SDL.dll and sdl-config. I have done all the default install options for MinGW and the included Msys; msys is located here C:\MinGW\msys\1.0.

Looking at this http://www.libsdl.org/extras/win32/mingw32/README.txt it says to copy SDL.dll from local/lib to the src directory when compiling. Although my SDL.dll is located in local/bin (I only have libSDL in /lib), I copied it to the dosbox src directory and still got the same errors.

I'm not sure what could be wrong as it seems pretty straight forward. I have the SDL and dosbox sources located in C:\MinGW\msys\1.0.

I tried the development libraries but got similar errors as well. It runs the configure okay but fails during the make.

Reply 3 of 16, by TeaRex

User metadata
Rank Member
Rank
Member

Can you post the FIRST error in the "whole bunch of errors related to SDL"? Because that's usually the real culprit, the rest is just follow-up errors caused by the parser getting out of sync with the code by the first error.

tearex

Reply 4 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

Okay, here is everything

$ make
make all-recursive
make[1]: Entering directory `/dosbox-0.74'
Making all in src
make[2]: Entering directory `/dosbox-0.74/src'
Making all in cpu
make[3]: Entering directory `/dosbox-0.74/src/cpu'
Making all in core_full
make[4]: Entering directory `/dosbox-0.74/src/cpu/core_full'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/dosbox-0.74/src/cpu/core_full'
Making all in core_normal
make[4]: Entering directory `/dosbox-0.74/src/cpu/core_normal'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/dosbox-0.74/src/cpu/core_normal'
Making all in core_dyn_x86
make[4]: Entering directory `/dosbox-0.74/src/cpu/core_dyn_x86'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/dosbox-0.74/src/cpu/core_dyn_x86'
Making all in core_dynrec
make[4]: Entering directory `/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/dosbox-0.74/src/cpu/core_dynrec'
make[4]: Entering directory `/dosbox-0.74/src/cpu'
make[4]: Nothing to be done for `all-am'.
make[4]: Leaving directory `/dosbox-0.74/src/cpu'
make[3]: Leaving directory `/dosbox-0.74/src/cpu'
Making all in debug
make[3]: Entering directory `/dosbox-0.74/src/debug'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/dosbox-0.74/src/debug'
Making all in dos
make[3]: Entering directory `/dosbox-0.74/src/dos'
g++ -DHAVE_CONFIG_H -I. -I../.. -I../../include -I/usr/local/include/SDL -D_GNU
_SOURCE=1 -Dmain=SDL_main -g -O2 -MT dos.o -MD -MP -MF .deps/dos.Tpo -c -o dos
.o dos.cpp
In file included from /usr/local/include/SDL/SDL_main.h:26,
from /usr/local/include/SDL/SDL.h:30,
from ../../include/timer.h:23,
from ../../include/serialport.h:31,
from dos.cpp:33:
/usr/local/include/SDL/SDL_stdinc.h:66:23: inttypes.h: No such file or directory

In file included from /usr/local/include/SDL/SDL_main.h:26,
from /usr/local/include/SDL/SDL.h:30,
from ../../include/timer.h:23,
from ../../include/serialport.h:31,
from dos.cpp:33:
/usr/local/include/SDL/SDL_stdinc.h:99: error: `uint8_t' does not name a type
/usr/local/include/SDL/SDL_stdinc.h:101: error: `uint16_t' does not name a type
/usr/local/include/SDL/SDL_stdinc.h:103: error: `uint32_t' does not name a type
/usr/local/include/SDL/SDL_stdinc.h:108: error: `uint64_t' does not name a type
/usr/local/include/SDL/SDL_stdinc.h:125: error: `Uint8' was not declared in this
scope
/usr/local/include/SDL/SDL_stdinc.h:127: error: `Uint16' was not declared in thi
s scope
/usr/local/include/SDL/SDL_stdinc.h:129: error: `Uint32' was not declared in thi
s scope
/usr/local/include/SDL/SDL_stdinc.h:131: error: `Uint64' was not declared in thi
s scope

Another disconcerting thing is that during the configure it says this:

checking SDL_sound.h usability... no
checking SDL_sound.h presence... no
checking for SDL_sound.h... no
checking for Sound_Init in -lSDL_sound... no
checking for Sound_Seek in -lSDL_sound... no
configure: WARNING: Can't find libSDL_sound, libSDL_sound support disabled

Does this mean I will not have sound enabled? If so, then how do I get or compile this other sdl library?

Reply 5 of 16, by TeaRex

User metadata
Rank Member
Rank
Member

OK, "inttypes.h" is a standard ANSI C header file since C99. If that cannot be found, your whole compiler environment is either quite old or seriously screwed. Can you successfully compile and run other things, such as a simple Hello World program? If so, I'd say

1.) Search your hard disk for the inttypes.h file. If it's found, make sure it's in a directory that belongs to your compiler and see to it that it can be found there. you can add CFLAGS="-Ipathname" (where pathname is the directory in which inttypes.h lives) to your configure run if you find no better way of doing this. just say

CFLAGS="-Iwhatever" ./configure

all in one line. At least that's the way you do it on real Unix-like systems with a Bourne type shell, I'm not sure about MinGW. Maybe you'll have to say

SET CFLAGS=-Iwhatever
./configure

on two lines if MinGW uses normal Windows CMD.EXE as opposed to a Unix Bourne type shell.

2.) If inttypes.h is not found, set up your compiler again. Make sure you get a recent version of all components.

You can worry about SDL_sound later I think. Once the DOSBox compilation works, the same setup should work for compiling SDL_sound from source as well.

tearex

Reply 6 of 16, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

don't worry about sdl_sound. it used for the audio tracks in cue/bin cdrom images.
"normal" sound will work if you can compile dosbox as dosbox depends on it.

Water flows down the stream
How to ask questions the smart way!

Reply 7 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

I'm not sure your setup is sound. Make sure you are using the latest combo of msys and mingw. with the latest one you can safely use the same folder (C:\mingw) for both. (and make sure you run this all in msys NOT the windows command line 😀)
There must be a simple how to somewhere for this 😀

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 8 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

Well I found inttypes.h in C:\MinGW\include. I tried adding this with CFLAGS="-I/c/MinGW/include" ./configure which seemed to work because it did not give me any errors like SET CFLAGS did. Unfortunately, it still did not detect inttypes.h. I also tried CFLAGS="-I/MinGW/include".

The Msys.bat which I'm using to compile is located in C:\MinGW\msys\1.0 and the dosbox source is in C:\MinGW\msys\1.0\dosbox-0.74. Everything is pretty much in one directory, C:\MinGW.

I'm not sure how I could have set up the compiling environment incorrectly because it basically did everything for me. I downloaded MinGW form here http://sourceforge.net/projects/mingw. When I installed it, it gave me the option to update everything and also install Msys, which it did automatically. I chose all default options; I didn't really have any chance to screw anything up.

edit: I forgot to mention that during the ./configure I noticed it said this:
checking for inttypes.h... yes

I'm not sure if that means anything but I found it interesting.

Reply 9 of 16, by TeaRex

User metadata
Rank Member
Rank
Member

This is looking increasingly strange. SDL_stdinc.h includes all kinds of stuff before inttypes.h, such as stdlib.h, stddef,h, stdarg.h, stdio.h, string.h so it seems to be finding those all right. Can you find out if those are in the same place as your inttypes.h?

Of course if the compiler totally refuses to cooperate, a last-ditch measure would be cutting and pasting the contents of inttypes.h into SDL_stdinc.h in place of the #include, but I really think there must be some better solution.

As for your -I flags you have to make sure that you use the path as MinGW itself uses it. try cd'ing by hand into the directory where GCC fails, then entering exactly the failing command there by hand. Just add a -v parameter at the beginning. This should make GCC report the include path it uses. Then post the results here.

You might also try using an -E parameter to GCC (leave everything else the same just change the -o parameter to something like <filename>.preprocessed or so) to get it to output the preprocessed C code, as far as it gets. That should tell you which includes are actually found, and where.

edit: I'm not certain if -E will output partial results on error. And I can't check this from here. So you'll just have to hope it does....

tearex

Reply 10 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

Here are the locations of those files:

string.h
C:\MinGW\include
C:\MinGW\msys\1.0\include
C:\MinGW\lib\gcc\mingw32\4.5.0\include\ssp

stdlib.h
C:\MinGW\include
C:\MinGW\msys\1.0\include

stdio.h
C:\MinGW\include
C:\MinGW\msys\1.0\include
C:\MinGW\lib\gcc\mingw32\4.5.0\include\ssp

stddef.h
C:\MinGW\lib\gcc\mingw32\4.5.0\include\
C:\MinGW\msys\1.0\lib\gcc\i686-pc-msys\3.4.4\include
C:\MinGW\msys\1.0\lib\gcc\i686-pc-msys\3.4.4\install-tools\include

stdar.h
C:\MinGW\lib\gcc\mingw32\4.5.0\include\
C:\MinGW\msys\1.0\lib\gcc\i686-pc-msys\3.4.4\include
C:\MinGW\msys\1.0\lib\gcc\i686-pc-msys\3.4.4\install-tools\include

Now I didn't quite follow what you said after that but here's what I tried:

$ gcc -v /usr/local/include/SDL/SDL_stdinc.h
Reading specs from /bin/../lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --s
ysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --
libexecdir=/lib --enable-languages=c,c++ --disable-nls --enable-threads=posix --
enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --
with-newlib
Thread model: posix
gcc version 3.4.4 (msys special)
/bin/../lib/gcc/i686-pc-msys/3.4.4/cc1.exe -quiet -v -iprefix /bin/../lib/gcc/i
686-pc-msys/3.4.4/ -D__CYGWIN__ -D__CYGWIN32__ -D__MSYS__ -Dunix -D__unix__ -D__
unix -idirafter /bin/../lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api -i
dirafter /bin/../lib/gcc/../../include/w32api /usr/local/include/SDL/SDL_stdinc.
h -quiet -dumpbase SDL_stdinc.h -mtune=pentiumpro -auxbase SDL_stdinc -version -
o /tmp/ccFBcB4f.s --output-pch=/usr/local/include/SDL/SDL_stdinc.h.gch
ignoring nonexistent directory "/bin/../lib/gcc/i686-pc-msys/3.4.4/../../../../i
686-pc-msys/include"
ignoring duplicate directory "/usr/lib/gcc/i686-pc-msys/3.4.4/include"
ignoring nonexistent directory "/usr/lib/gcc/i686-pc-msys/3.4.4/../../../../i686
-pc-msys/include"
ignoring duplicate directory "/bin/../lib/gcc/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
/bin/../lib/gcc/i686-pc-msys/3.4.4/include
/usr/local/include
/usr/include
/bin/../lib/gcc/i686-pc-msys/3.4.4/../../../../include/w32api
End of search list.
GNU C version 3.4.4 (msys special) (i686-pc-msys)
compiled by GNU C version 3.4.4 (msys special).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=129973
/usr/local/include/SDL/SDL_stdinc.h:66:23: inttypes.h: No such file or directory

/usr/local/include/SDL/SDL_stdinc.h:99: error: parse error before "Uint8"
/usr/local/include/SDL/SDL_stdinc.h:99: warning: data definition has no type or
storage class
/usr/local/include/SDL/SDL_stdinc.h:101: error: parse error before "Uint16"
/usr/local/include/SDL/SDL_stdinc.h:101: warning: data definition has no type or
storage class
/usr/local/include/SDL/SDL_stdinc.h:103: error: parse error before "Uint32"
/usr/local/include/SDL/SDL_stdinc.h:103: warning: data definition has no type or
storage class
/usr/local/include/SDL/SDL_stdinc.h:108: error: parse error before "Uint64"
/usr/local/include/SDL/SDL_stdinc.h:108: warning: data definition has no type or
storage class
/usr/local/include/SDL/SDL_stdinc.h:125: error: size of array `SDL_dummy_uint8'
is negative
/usr/local/include/SDL/SDL_stdinc.h:127: error: size of array `SDL_dummy_uint16'
is negative
/usr/local/include/SDL/SDL_stdinc.h:131: error: size of array `SDL_dummy_uint64'
is negative

I also tried gcc -E /usr/local/include/SDL/SDL_stdinc.h (I didn't know what you meant by -o parameter or that .preprocessed thing) and I got a bunch of weird stuff so I don't know if I did it right or not.

void * __attribute__((__cdecl__)) calloc (size_t __nmemb, size_t __size);
div_t __attribute__((__cdecl__)) div (int __numer, int __denom);
void __attribute__((__cdecl__)) exit (int __status) __attribute__ ((noreturn));
void __attribute__((__cdecl__)) free (void *);
char * __attribute__((__cdecl__)) getenv (const char *__string);
char * __attribute__((__cdecl__)) _getenv_r (struct _reent *, const char *__str
ng);
char * __attribute__((__cdecl__)) _findenv (const char *, int *);
char * __attribute__((__cdecl__)) _findenv_r (struct _reent *, const char *, in
*);
long __attribute__((__cdecl__)) labs (long);
ldiv_t __attribute__((__cdecl__)) ldiv (long __numer, long __denom);
void * __attribute__((__cdecl__)) malloc (size_t __size);
int __attribute__((__cdecl__)) mblen (const char *, size_t);
int __attribute__((__cdecl__)) _mblen_r (struct _reent *, const char *, size_t,
int *);
int __attribute__((__cdecl__)) mbtowc (wchar_t *, const char *, size_t);
int __attribute__((__cdecl__)) _mbtowc_r (struct _reent *, wchar_t *, const cha
*, size_t, int *);
int __attribute__((__cdecl__)) wctomb (char *, wchar_t);
int __attribute__((__cdecl__)) _wctomb_r (struct _reent *, char *, wchar_t, int
*);
size_t __attribute__((__cdecl__)) mbstowcs (wchar_t *, const char *, size_t);
size_t __attribute__((__cdecl__)) _mbstowcs_r (struct _reent *, wchar_t *, cons
char *, size_t, int *);
size_t __attribute__((__cdecl__)) wcstombs (char *, const wchar_t *, size_t);
size_t __attribute__((__cdecl__)) _wcstombs_r (struct _reent *, char *, const w
har_t *, size_t, int *);


int __attribute__((__cdecl__)) mkstemp (char *);
char * __attribute__((__cdecl__)) mktemp (char *);


void __attribute__((__cdecl__)) qsort (void * __base, size_t __nmemb, size_t __
ize, int(*_compar)(const void *, const void *));
int __attribute__((__cdecl__)) rand (void);
void * __attribute__((__cdecl__)) realloc (void * __r, size_t __size);
void __attribute__((__cdecl__)) srand (unsigned __seed);
double __attribute__((__cdecl__)) strtod (const char *__n, char **_end_PTR);
double __attribute__((__cdecl__)) _strtod_r (struct _reent *,const char *__n, c
ar **_end_PTR);

float __attribute__((__cdecl__)) strtodf (const char *__n, char **_end_PTR);

long __attribute__((__cdecl__)) strtol (const char *__n, char **_end_PTR, int _
base);
long __attribute__((__cdecl__)) _strtol_r (struct _reent *,const char *__n, cha
**_end_PTR, int __base);
unsigned long __attribute__((__cdecl__)) strtoul (const char *_n_PTR, char **_e
d_PTR, int __base);
unsigned long __attribute__((__cdecl__)) _strtoul_r (struct _reent *,const char
*_n_PTR, char **_end_PTR, int __base);
int __attribute__((__cdecl__)) system (const char *__string);


int __attribute__((__cdecl__)) putenv (const char *__string);
int __attribute__((__cdecl__)) _putenv_r (struct _reent *, const char *__string
;
int __attribute__((__cdecl__)) setenv (const char *__string, const char *__valu
Show last 235 lines
, int __overwrite);
int __attribute__((__cdecl__)) _setenv_r (struct _reent *, const char *__string
const char *__value, int __overwrite);

char * __attribute__((__cdecl__)) gcvt (double,int,char *);
char * __attribute__((__cdecl__)) gcvtf (float,int,char *);
char * __attribute__((__cdecl__)) fcvt (double,int,int *,int *);
char * __attribute__((__cdecl__)) fcvtf (float,int,int *,int *);
char * __attribute__((__cdecl__)) ecvt (double,int,int *,int *);
char * __attribute__((__cdecl__)) ecvtbuf (double, int, int*, int*, char *);
char * __attribute__((__cdecl__)) fcvtbuf (double, int, int*, int*, char *);
char * __attribute__((__cdecl__)) ecvtf (float,int,int *,int *);
char * __attribute__((__cdecl__)) dtoa (double, int, int, int *, int*, char**);
int __attribute__((__cdecl__)) rand_r (unsigned *__seed);

double __attribute__((__cdecl__)) drand48 (void);
double __attribute__((__cdecl__)) _drand48_r (struct _reent *);
double __attribute__((__cdecl__)) erand48 (unsigned short [3]);
double __attribute__((__cdecl__)) _erand48_r (struct _reent *, unsigned short [
]);
long __attribute__((__cdecl__)) jrand48 (unsigned short [3]);
long __attribute__((__cdecl__)) _jrand48_r (struct _reent *, unsigned short [3]
;
void __attribute__((__cdecl__)) lcong48 (unsigned short [7]);
void __attribute__((__cdecl__)) _lcong48_r (struct _reent *, unsigned short [7]
;
long __attribute__((__cdecl__)) lrand48 (void);
long __attribute__((__cdecl__)) _lrand48_r (struct _reent *);
long __attribute__((__cdecl__)) mrand48 (void);
long __attribute__((__cdecl__)) _mrand48_r (struct _reent *);
long __attribute__((__cdecl__)) nrand48 (unsigned short [3]);
long __attribute__((__cdecl__)) _nrand48_r (struct _reent *, unsigned short [3]
;
unsigned short *
__attribute__((__cdecl__)) seed48 (unsigned short [3]);
unsigned short *
__attribute__((__cdecl__)) _seed48_r (struct _reent *, unsigned short [3
);
void __attribute__((__cdecl__)) srand48 (long);
void __attribute__((__cdecl__)) _srand48_r (struct _reent *, long);




char * __attribute__((__cdecl__)) realpath (const char *, char *);
void __attribute__((__cdecl__)) unsetenv (const char *__string);
void __attribute__((__cdecl__)) _unsetenv_r (struct _reent *, const char *__str
ng);
int __attribute__((__cdecl__)) random (void);
long __attribute__((__cdecl__)) srandom (unsigned __seed);
char * __attribute__((__cdecl__)) ptsname (int);
int __attribute__((__cdecl__)) grantpt (int);
int __attribute__((__cdecl__)) unlockpt (int);




char * __attribute__((__cdecl__)) _dtoa_r (struct _reent *, double, int, int, i
t *, int*, char**);
void * __attribute__((__cdecl__)) _malloc_r (struct _reent *, size_t);
void * __attribute__((__cdecl__)) _calloc_r (struct _reent *, size_t, size_t);
void __attribute__((__cdecl__)) _free_r (struct _reent *, void *);
void * __attribute__((__cdecl__)) _realloc_r (struct _reent *, void *, size_t);
void __attribute__((__cdecl__)) _mstats_r (struct _reent *, char *);
int __attribute__((__cdecl__)) _system_r (struct _reent *, const char *);

void __attribute__((__cdecl__)) __eprintf (const char *, const char *, unsigned
int, const char *);
# 41 "/usr/local/include/SDL/SDL_stdinc.h" 2
# 1 "/bin/../lib/gcc/i686-pc-msys/3.4.4/include/stddef.h" 1 3 4
# 42 "/usr/local/include/SDL/SDL_stdinc.h" 2
# 1 "/bin/../lib/gcc/i686-pc-msys/3.4.4/include/stdarg.h" 1 3 4
# 106 "/bin/../lib/gcc/i686-pc-msys/3.4.4/include/stdarg.h" 3 4
typedef __gnuc_va_list va_list;
# 43 "/usr/local/include/SDL/SDL_stdinc.h" 2
# 60 "/usr/local/include/SDL/SDL_stdinc.h"
# 1 "/usr/include/string.h" 1 3 4
# 18 "/usr/include/string.h" 3 4
# 1 "/bin/../lib/gcc/i686-pc-msys/3.4.4/include/stddef.h" 1 3 4
# 19 "/usr/include/string.h" 2 3 4





void * __attribute__((__cdecl__)) memchr (const void *, int, size_t);
int __attribute__((__cdecl__)) memcmp (const void *, const void *, size_t);
void * __attribute__((__cdecl__)) memcpy (void *, const void *, size_t);
void * __attribute__((__cdecl__)) memmove (void *, const void *, size_t);
void * __attribute__((__cdecl__)) memset (void *, int, size_t);
char *__attribute__((__cdecl__)) strcat (char *, const char *);
char *__attribute__((__cdecl__)) strchr (const char *, int);
int __attribute__((__cdecl__)) strcmp (const char *, const char *);
int __attribute__((__cdecl__)) strcoll (const char *, const char *);
char *__attribute__((__cdecl__)) strcpy (char *, const char *);
size_t __attribute__((__cdecl__)) strcspn (const char *, const char *);
char *__attribute__((__cdecl__)) strerror (int);
size_t __attribute__((__cdecl__)) strlen (const char *);
char *__attribute__((__cdecl__)) strncat (char *, const char *, size_t);
int __attribute__((__cdecl__)) strncmp (const char *, const char *, size_t);
char *__attribute__((__cdecl__)) strncpy (char *, const char *, size_t);
char *__attribute__((__cdecl__)) strpbrk (const char *, const char *);
char *__attribute__((__cdecl__)) strrchr (const char *, int);
size_t __attribute__((__cdecl__)) strspn (const char *, const char *);
char *__attribute__((__cdecl__)) strstr (const char *, const char *);


char *__attribute__((__cdecl__)) strtok (char *, const char *);


size_t __attribute__((__cdecl__)) strxfrm (char *, const char *, size_t);


char *__attribute__((__cdecl__)) strtok_r (char *, const char *, char **);

int __attribute__((__cdecl__)) bcmp (const char *, const char *, size_t);
void __attribute__((__cdecl__)) bcopy (const char *, char *, size_t);
void __attribute__((__cdecl__)) bzero (char *, size_t);
int __attribute__((__cdecl__)) ffs (int);
char *__attribute__((__cdecl__)) index (const char *, int);
void * __attribute__((__cdecl__)) memccpy (void *, const void *, int, size_t);
char *__attribute__((__cdecl__)) rindex (const char *, int);
int __attribute__((__cdecl__)) strcasecmp (const char *, const char *);
char *__attribute__((__cdecl__)) strdup (const char *);
char *__attribute__((__cdecl__)) _strdup_r (struct _reent *, const char *);
int __attribute__((__cdecl__)) strncasecmp (const char *, const char *, size_t)

char *__attribute__((__cdecl__)) strsep (char **, const char *);
char *__attribute__((__cdecl__)) strlwr (char *);
char *__attribute__((__cdecl__)) strupr (char *);


const char *__attribute__((__cdecl__)) strsignal (int __signo);

int __attribute__((__cdecl__)) strtosigno (const char *__name);
# 61 "/usr/local/include/SDL/SDL_stdinc.h" 2


# 1 "/usr/include/strings.h" 1 3 4
# 64 "/usr/local/include/SDL/SDL_stdinc.h" 2
/usr/local/include/SDL/SDL_stdinc.h:66:23: inttypes.h: No such file or director








# 1 "/usr/include/ctype.h" 1 3 4
# 9 "/usr/include/ctype.h" 3 4
int __attribute__((__cdecl__)) isalnum (int __c);
int __attribute__((__cdecl__)) isalpha (int __c);
int __attribute__((__cdecl__)) iscntrl (int __c);
int __attribute__((__cdecl__)) isdigit (int __c);
int __attribute__((__cdecl__)) isgraph (int __c);
int __attribute__((__cdecl__)) islower (int __c);
int __attribute__((__cdecl__)) isprint (int __c);
int __attribute__((__cdecl__)) ispunct (int __c);
int __attribute__((__cdecl__)) isspace (int __c);
int __attribute__((__cdecl__)) isupper (int __c);
int __attribute__((__cdecl__)) isxdigit (int __c);
int __attribute__((__cdecl__)) tolower (int __c);
int __attribute__((__cdecl__)) toupper (int __c);


int __attribute__((__cdecl__)) isascii (int __c);
int __attribute__((__cdecl__)) toascii (int __c);
int __attribute__((__cdecl__)) _tolower (int __c);
int __attribute__((__cdecl__)) _toupper (int __c);
# 39 "/usr/include/ctype.h" 3 4
extern __attribute__((dllimport)) const char _ctype_[];
# 72 "/usr/local/include/SDL/SDL_stdinc.h" 2
# 93 "/usr/local/include/SDL/SDL_stdinc.h"
typedef enum {
SDL_FALSE = 0,
SDL_TRUE = 1
} SDL_bool;

typedef int8_t Sint8;
typedef uint8_t Uint8;
typedef int16_t Sint16;
typedef uint16_t Uint16;
typedef int32_t Sint32;
typedef uint32_t Uint32;


typedef int64_t Sint64;

typedef uint64_t Uint64;
# 125 "/usr/local/include/SDL/SDL_stdinc.h"
typedef int SDL_dummy_uint8[(sizeof(Uint8) == 1) * 2 - 1];
typedef int SDL_dummy_sint8[(sizeof(Sint8) == 1) * 2 - 1];
typedef int SDL_dummy_uint16[(sizeof(Uint16) == 2) * 2 - 1];
typedef int SDL_dummy_sint16[(sizeof(Sint16) == 2) * 2 - 1];
typedef int SDL_dummy_uint32[(sizeof(Uint32) == 4) * 2 - 1];
typedef int SDL_dummy_sint32[(sizeof(Sint32) == 4) * 2 - 1];
typedef int SDL_dummy_uint64[(sizeof(Uint64) == 8) * 2 - 1];
typedef int SDL_dummy_sint64[(sizeof(Sint64) == 8) * 2 - 1];
# 146 "/usr/local/include/SDL/SDL_stdinc.h"
typedef enum {
DUMMY_ENUM_VALUE
} SDL_DUMMY_ENUM;


typedef int SDL_dummy_enum[(sizeof(SDL_DUMMY_ENUM) == sizeof(int)) * 2 - 1];



# 1 "/usr/local/include/SDL/begin_code.h" 1
# 156 "/usr/local/include/SDL/SDL_stdinc.h" 2
# 403 "/usr/local/include/SDL/SDL_stdinc.h"
extern size_t SDL_strlcpy(char *dst, const char *src, size_t maxlen);





extern size_t SDL_strlcat(char *dst, const char *src, size_t maxlen);
# 601 "/usr/local/include/SDL/SDL_stdinc.h"
typedef struct _SDL_iconv_t *SDL_iconv_t;
extern SDL_iconv_t SDL_iconv_open(const char *tocode, const char *fromcode);
extern int SDL_iconv_close(SDL_iconv_t cd);

extern size_t SDL_iconv(SDL_iconv_t cd, const char **inbuf, size_t *inbytesleft
char **outbuf, size_t *outbytesleft);



extern char * SDL_iconv_string(const char *tocode, const char *fromcode, const
har *inbuf, size_t inbytesleft);
# 618 "/usr/local/include/SDL/SDL_stdinc.h"
# 1 "/usr/local/include/SDL/close_code.h" 1
# 619 "/usr/local/include/SDL/SDL_stdinc.h" 2

Well not sure what to make of it but I appreciate the help.

Reply 11 of 16, by TeaRex

User metadata
Rank Member
Rank
Member

Well that's something. It looks like you you have two different MinGW releases on your system that got mixed up with each other? One with GCC 3.4.4 and one with GCC 4.5.0? Is it possible that you had a newer one installed at some earlier time and now installed an old one over the other? Or (slightly less likely I think, from your output) vice versa?

I'd say kill your whole MinGW installation: Uninstall from Windows, then delete the whole directory C:\MinGW from Windows if it still exists, then reinstall. The newer GCC version seems preferable, so if you know which download package corresponds to which GCC, I'd say go with the newer version. Though the x.y.0 versions of GCC, such as 4.5.0, are known as relatively buggy... so if you can install a MinGW that contains GCC 4.5.1 or GCC 4.4.x with x=3 or 4 that would be the best. If such a thing exists, as non-user of MinGW I unfortunately don't know.

If this doesn't work or if the problem persists, I'll have to think of something new... e.g. you could copy the inttypes.h that you found to a couple of the other locations where you found headers (i.e. files with .h at the end of the name; as listed at the beginning of your last post). That should allow the #include to succeed in any case, but it's an evil hack. I'm not sure whether the content of inttypes.h itself depends on the compiler version. The #include might succeed and the compilation still fail.

edit: By the way the -E gives you the preprocessed code, i.e. after the compiler has processed all the lines that start with # (such as #include, #ifdef...#endif) and after doing macro expansion, but before compilation proper. It's interesting in this case because it shows where each #include file was found.

tearex

Reply 12 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

I actually have tried deleting and reinstalling to no effect. As I said, it pretty much does everything automatically and I don't really know of any other way to get msys installed along with mingw except through that file at sourceforge. What seems to be happening is that MinGW and Msys have their own separate gcc versions. In C:\MinGW\msys\1.0\bin resides a gcc.exe that is:

C:\MinGW\msys\1.0\bin>gcc -v
Reading specs from /usr/lib/gcc/i686-pc-msys/3.4.4/specs
Configured with: /home/cstrauss/build/gcc3/gcc-3.4.4/configure --prefix=/usr --s
ysconfdir=/etc --localstatedir=/var --infodir=/share/info --mandir=/share/man --
libexecdir=/lib --enable-languages=c,c++ --disable-nls --enable-threads=posix --
enable-sjlj-exceptions --enable-hash-synchronization --enable-libstdcxx-debug --
with-newlib
Thread model: posix
gcc version 3.4.4 (msys special)

And in C:\MinGW\bin is a gcc.exe that is:

C:\MinGW\bin>gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.0/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.0/configure --enable-languages=c,c++,ada,fortran,ob
c,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libg
mp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-
untime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.0 (GCC)

As far as I have read on the web, this is how msys and mingw are supposed to operate, with msys being in a subfolder of mingw. There's no options during installation to change the directory or options of msys, only a check box to install it along with mingw.

Reply 13 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

As far as I have read on the web, this is how msys and mingw are supposed to operate, with msys being in a subfolder of mingw.

This is how it used to be, though in later years it was possible to use both in the same folder, which is what I did and had working until last year when I switched to Mac.

There's no options during installation to change the directory or options of msys, only a check box to install it along with mingw.

I'm really not sure whether this is working right, it seems like it doesn't do things correctly. I'd try to find some other guide which tells you which packages to use and install.

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 14 of 16, by Xenphor

User metadata
Rank Member
Rank
Member

Well I tried following a few things described here: http://www.mingw.org/wiki/MSYS

I did

mount c:/mingw /mingw

as well as

./configure --prefix=/mingw
make
make install

I still get the same error. Not really sure where else I could find a guide for this.

Reply 16 of 16, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Not really sure where else I could find a guide for this.

google/bing/whatever might help you...

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper