[SDL] WinDIB

Kylotan kylotan at kylotan.eidosnet.co.uk
Wed Aug 8 23:07:01 PDT 2001


> > The problem is that both SDL and your app have a copy of the
> > environemnt; so putenv changes your app's environment, but SDL (the
DLL)
> > won't see it. You need to tell SDL and your app to link to
msvcrt.lib (or
> > msvcrtd.lib in the "Debug" release settings), recompile, and it
should
> > work fine.
>
> As far as I know, if you follow the recommendation in the FAQ to build
> with "Multithreaded DLL" settings, it should work.  Please let me know
> if this isn't the case.

I was certainly using the Multithreaded DLL, as this was the only way I
could get my application to link with the SDL library in the first
place. (By the way, is this easy to change? One reason is because, as
far as I know, the first release of Win95 doesn't have msvcrt.dll by
default) But using _putenv doesn't work in this case. I can confirm (for
a previous poster) that SetEnvironmentVariable (a Win32 API function)
doesn't work any more than _putenv does. (But it is almost certain that
_putenv maps directly to SetEnvironmentVariable in the runtime library
anyway.)

This doesn't bother me, since I don't anticipate needing the Windib
driver for much, but it might be a concern for someone else.

For what it's worth, I use MSVC6.0 with Service Pack 3, on Windows 98
SE.

--
Ben Sizer





More information about the SDL mailing list