Problem with SDL when using /MT compiler settting

Hello,

So, I have a project that has been built using the /MD compiler setting.

In order to utilize a new 3rd party library which was built using /MT I have to switch my project to /MT (unless we an get the 3rd party devloper to change theirs, that is not near happenign yet).

When I do that though I get a couple of linking errors related to sdl:

Error LNK2019 unresolved external symbol __imp__setbuf referenced in function _redirect_output cmj C:\dev\Products\cmj\cmj\VC7 Project\sdlmain.lib(SDL_win32_main.obj)

Error LNK2019 unresolved external symbol __imp__freopen referenced in function _redirect_output cmj C:\dev\Products\cmj\cmj\VC7 Project\sdlmain.lib(SDL_win32_main.obj)

I rebuilt SDL(sdl and sdlmain, this SDL 1.2) using the /MT setting as well and that resolves the linking errors but now the program crashes almost immediately after you run it in SDL.dll, I think a memcopy funciton, memory access violation.

I am hoping someone out there is familiar with this thype of problem…

Thanks,
Steve------------------------
Thanks,
Steve

btw, this is Microsof Visual Studio Community 2015------------------------
Thanks,
Steve

Is it a requirement to use Multithreaded DLL and Debug Multithreaded DLL C runtime libraries when using SDL?------------------------
Thanks,
Steve

I should also add…The whole project worked fine before trying to add this new library that uses /MT. Everythgin was built using the /MD setting.------------------------
Thanks,
Steve

I think it is necessary to have all library have the same flags as the
application.On Mar 24, 2016 10:39 PM, “suhlman” wrote:

I should also add…The whole project worked fine before trying to
add this new library that uses /MT. Everythgin was built using the /MD
setting.


Thanks,
Steve


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org