-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows 9X: SDL.DLL linked to MSVCRT.DLL:_strtoui64 #884
Comments
Is that the only export that's missing? You can check by loading SDL.DLL into Dependency Walker from within Windows 98. |
Looks like _strtoi? aren't present in win9x version of msvcrt.dll, even in latest vc6redist (e.g. from https://web.archive.org/web/20070329052640/http://support.microsoft.com/kb/259403) Try commenting out those defines in the generated SDL_config.h |
@ccawley2011 Just checked, those really seem to be the only two. @sezero I ran the configure command and then edited |
It is worth noting that _strtoi64 and _strtoui64 are mentioned in the changelog for 1.2.16: Line 120 in 0569bc6
|
I know
That doesn't make sense. I ran configure myself, commented out those two, built, and the generated dll doesn't link to _strtoi64 and _strtoui64 for me. Is yours really a clean build? |
@sezero I made an entirely new clone of this git repo, did it again, same result. From this a66cc7f it looked like I might also have to undefine Made another fresh clone, configured, changed the config, did Sorry, I don't mean to cause confusion, I commented out these lines in #define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE__STRTOI64 1
#define HAVE__STRTOUI64 1 Like so: //#define HAVE_STRTOLL 1
//#define HAVE_STRTOULL 1
//#define HAVE__STRTOI64 1
//#define HAVE__STRTOUI64 1 ...before running make. |
I did exactly as you did, still can't reproduce.
This is with gcc 7.5 and binutils 2.29.1 and mingw-w64 8.0.3 Attaching my edited config and generated dll: 12.zip |
@sezero I've tried your DLL and it works without issue. I will post my binary and config: sdl1.2.zip -- Our configs seem very similar, though. I will have to sleep now, I'll try again tomorrow. |
The only difference are At this point, all I can think of is maybe your mingw-w64 version is internally using _strtoi64 and _strtoui64 and leaking into the dll??? Hm, can you try, after configuring and editing the generated SDL_config.h, edit the generated Makefile and append EDIT: Forgot to note: Appending |
@sezero I added Do you think this is worth bringing up in the mingw-w64 project as an issue? Here is my final script that cross-compiles SDL 1.2 for W9X: CFLAGS="-march=i486 -O2 -D_WIN32_WINNT=0x0400 -DWINVER=0x0400 -D__USE_MINGW_ANSI_STDIO=0" \
CXXFLAGS="-march=i486 -O2 -D_WIN32_WINNT=0x0400 -DWINVER=0x0400 -D__USE_MINGW_ANSI_STDIO=0" \
./configure --host=i686-w64-mingw32 --prefix=/opt/sdl1.2
sed -i -e 's/#define HAVE_STRTOLL 1/\/\/#define HAVE_STRTOLL 1/g' "include/SDL_config.h"
sed -i -e 's/#define HAVE_STRTOULL 1/\/\/#define HAVE_STRTOULL 1/g' "include/SDL_config.h"
sed -i -e 's/#define HAVE__STRTOI64 1/\/\/#define HAVE__STRTOI64 1/g' "include/SDL_config.h"
sed -i -e 's/#define HAVE__STRTOUI64 1/\/\/#define HAVE__STRTOUI64 1/g' "include/SDL_config.h"
make -j4
make install About If that suggestion makes sense, I could also test a 2000 SP4, to see if the breaking point is |
OK, great!
I may actually do that, yes
A test would be welcome (I don't have immediate access to w2k versions of msvcrt.dll) P.S.: I am surprised that a mingw-w64 built SDL dll worked under w9x. I'd have suggested using original old mingw.org for that. |
@sezero Those functions are available in W2K SP4 :)
Huh! I'll keep that in mind should issues crop up in the future. Thanks again. |
For what it's worth, I created a patch for mingw-w64 a while ago that allows the use of |
OK looking at it, this can be really hairy at configuration level. FWIW, here is my own SDL.dll I've been using which is built using against |
When I use SDL.DLL on Windows 98 Second Edition, I get this error:
I configure SDL like this:
I tried commenting out line 118 and 119 in
include/SDL_config_win32.h
without success:SDL-1.2/include/SDL_config_win32.h
Lines 118 to 119 in 0569bc6
Is the issue with my compiler? I use
i686-w64-mingw32-gcc (GCC) 13.2.0
on Gentoo i486.The text was updated successfully, but these errors were encountered: