ali-alidoust / gta5-extended-video-export

GTA V Video Export Enhancement
Apache License 2.0
25 stars 17 forks source link

capstone.lib is built with /mt (libcmt.lib) instead of /md (msvcrt.lib) #6

Open mcmtroffaes opened 7 years ago

mcmtroffaes commented 7 years ago

... so consequently we are linking against multiple runtimes in the resulting asi file - this is a bad idea; see https://msdn.microsoft.com/en-us/library/6wtdswk0.aspx We should probably build capstone ourselves with /md. Currently we're surpressing the warning by explicitly not linking against libcmt (see commit cee359ac293592e397173f7d47bf8db26e2b2001).

mcmtroffaes commented 7 years ago

A quick progress update on this. I've got a branch that builds capstone with /md - however it turns out that the libyara nuget that we are using is also built with /mt instead of /md - see https://github.com/kallanreed/yara/blob/dbae9b0fd0efc87dfb24dceb4a6f72c0b84481b0/windows/vs2015/libyara/libyara.vcxproj#L158 ...

(For the record, I tracked this down with "dumpbin /directives" on libyara64.lib.)

ali-alidoust commented 7 years ago

What would be the consequences if we were to use /mt instead of /md on the project itself?

mcmtroffaes commented 7 years ago

Yeah the thought crossed my mind (in fact I think that's how it originally was set up by you). Microsoft generally recommends /md though. In any case, I think the main issue would be that ffmpeg might be incompatible: the mingw64 binaries might not work with libcmt. Will test it.