[FFmpeg-user] Building with libass on Windows

Max Ashton max at halfapixel.net
Thu Sep 7 04:06:57 EEST 2017


Hi everyone,

I'm trying to compile ffmpeg on windows with the libass extensions/configuration option.

Using the visual studio project libass-msvc I built libass 0.13.7 using Visual Studio as a static lib.

I then installed MinGW32 with MSYS and pkg-config. Following the instructions on the ffmpeg MSVC installation guide I configured the environment to build with the MSVC linker and to build in x64.

I then create a .pc file for libass and added this to the PKG_CONFIG_PATH environment variable so libass is in the pkg-config scope. Additionally I add the include and lib directories to INCLUDE and LIBPATH variables so the MSVC linker can link with them.

When I try to configure libass for compilation using ./configure --enable-libass --toolchain=msvc in MSYS I get the following error in the log file:

check_func_headers ass/ass.h ass_library_init
check_ld cc
check_cc
BEGIN ./ffconf.RZMYFWdc/test.c
    1         #include <ass/ass.h>
    2         #include <stdint.h>
    3         long check_ass_library_init(void) { return (long) ass_library_init; }
    4         int main(void) { int ret = 0;
    5         ret |= ((intptr_t)check_ass_library_init) & 0xFFFF;
    6         return ret; }
END ./ffconf.RZMYFWdc/test.c
cl -D_ISOC99_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_WIN32_WINNT=0x0502 -nologo -c -Fo./ffconf.RZMYFWdc/test.o ./ffconf.RZMYFWdc/test.c
test.c
./ffconf.RZMYFWdc/test.c(3): warning C4311: 'type cast': pointer truncation from 'ASS_Library *(__cdecl *)(void)' to 'long'
./compat/windows/mslink -nologo -out:./ffconf.RZMYFWdc/test.exe ./ffconf.RZMYFWdc/test.o psapi.lib advapi32.lib shell32.lib ole32.lib
test.o : error LNK2019: unresolved external symbol ass_library_init referenced in function check_ass_library_init
./ffconf.RZMYFWdc/test.exe : fatal error LNK1120: 1 unresolved externals
ERROR: libass not found using pkg-config

The libass test prject which uses ass_library_init compiles fine using the same lib files, the libs appear to be fine.

My aim to be able to compile FFMpeg with custom filters created in visual studios, thus using MSVC instead of GNU. Am I going about compiling FFMpeg in the wrong way?

Any ideas on how I might solve this error would be amazing!

Thanks in advanced!


More information about the ffmpeg-user mailing list