Thread: L-SMASH Source
View Single Post
Old 22nd March 2013, 13:33   #33  |  Link
qyot27
...?
 
qyot27's Avatar
 
Join Date: Nov 2005
Location: Florida
Posts: 1,420
Following up again, it seems that the offending option was /OPT:REF. Setting /OPT:NOREF makes Release builds work for me, even with /GL and /LTCG enabled. My guess is that /OPT:REF was pruning stuff out of the .dll that it shouldn't have (as that's what the documentation makes it sound like it does), and therefore causing the crashes and Access Violations. The resultant build size is a more modest 7MB or so. Probably could be reduced further, since the FFmpeg build used wasn't the type of minimal compile I use for FFMS2 (I'd also neglected to enable avresample since I actually built it to verify whether it still wanted to crash with the new AviSynth demuxer when built with MSVC...thankfully, it works fine).

LSMASHSource r507

It's been optimized for SSE. Built with VS2010.




Further notes on building:

MinGW-w64's supplied version of libmingwex.a has incompatibilities with MSVC
Use the non-w64 version of the tdm toolchain to build L-SMASH

Build FFmpeg with MSVC as roughly outlined here: http://ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b
One thing to note is that the c99-to-c89 wrapper should be version 1.0, not version 1.0.1 (unless you want to compile 1.0.1 yourself with Clang, I guess) - the distributed binaries of 1.0.1 have their permissions screwed up somehow and error out with 'Bad file number'. The 1.0 binaries are fine.

Both Debug and Release:
Remove libmingwex.lib from Source Files (select 'Remove' from LSMASHSource project)

Configuration Properties -> VC++ Directories
Add the GCC lib/includes, MinGW lib/includes, and in my case, locally-installed FFmpeg & L-SMASH lib/includes
Append the following directories to the end of their respective lists:
C:\MinGW\tdm-mingw\lib\gcc\mingw32\4.7.1\include
C:\MinGW\tdm-mingw\include
C:\MinGW\home\username\win32_build\include

C:\MinGW\tdm-mingw\lib\gcc\mingw32\4.7.1
C:\MinGW\tdm-mingw\lib
C:\MinGW\home\username\win32_build\lib

Configuration Properties -> Linker -> Input
Append the following .a files to the end of the list.
Additional Dependences: libmsvcr100.a;libmingwex.a;libmingw32.a;libws2_32.a;libwsock32.a

Ignore Specific Default Libraries: libcmt.lib


'Release' build specific:
Configuration Properties -> Linker -> Debugging
Generate Debug Info: No
(There's no point to the 'Release' build generating Debug info, IMO)

Configuration Properties -> Linker -> Optimization
References: No

Last edited by qyot27; 22nd March 2013 at 13:35.
qyot27 is offline   Reply With Quote