The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
problem with SDL when using /MT compiler settting
suhlman


Joined: 09 Dec 2015
Posts: 14
Location: Halifax, Nova Scotia, Canada
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
suhlman


Joined: 09 Dec 2015
Posts: 14
Location: Halifax, Nova Scotia, Canada
btw, this is Microsof Visual Studio Community 2015
suhlman


Joined: 09 Dec 2015
Posts: 14
Location: Halifax, Nova Scotia, Canada
Is it a requirement to use Multithreaded DLL and Debug Multithreaded DLL C runtime libraries when using SDL?
suhlman


Joined: 09 Dec 2015
Posts: 14
Location: Halifax, Nova Scotia, Canada
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.
problem with SDL when using /MT compiler settting
Wutipong Wongsakuldej
Guest

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:
Quote:
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

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org