Problems compiling in Windows

For discussion of topics specific to MythTV on windows
Post Reply
srochford
Newcomer
Posts: 5
Joined: Wed Jul 02, 2014 5:57 pm
Great Britain

Problems compiling in Windows

Post by srochford »

I'm trying to compile v31/fixes. I've got a Windows 10 machine with MingGW, Visual Studio 2019, QT and a few other bits installed and (I think!) configured properly. I've updated the vcxproj files so that they work with Visual Studio 2019.

When I run powershell .\configure.ps1 everything starts OK (compiling the stuff under mythtv\platform\win32\msvc) and then gets to the point where it compiles ffmpeg. There's a warning that it will take a while with no output and then loads of output from the compilation appears. There are multiple warnings (eg stuff like warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data) Finally, there's a linker warning, a series of errors and it fails:

LINK : warning LNK4044: unrecognized option '/lmythavutil'; ignored
Creating library libswscale/libmythswscale.lib and object libswscale/libmythswscale.exp
vscale.o : error LNK2001: unresolved external symbol av_log
<cut>
libswscale\libmythswscale-5.dll : fatal error LNK1120: 18 unresolved externals
make: *** [libswscale/libmythswscale-5.dll] Error 96

I think all the errors are because the mythavutil library has not been linked - there is a file created called avutil.lib in the libavutil folder under ffmpeg. In the same folder, there's a file avutil-56.def which looks like a list of exports from that library and most of the missing "unresolved external symbols" are listed there.

I think (but I'm no expert!) that there's something wrong with the process that calls the linker but I don't know where to start looking - I can't find anything obvious in any of the Makefiles.

Any ideas??

Steve
arobro
Newcomer
Posts: 1
Joined: Tue Apr 26, 2022 2:48 am
New Zealand

Re: Problems compiling in Windows

Post by arobro »

I've managed to get mythtv to compile for windows and uploaded the build here. github (dot) com/arobro/mythtv/releases

The changes have been committed and you can run a cross compile in ubuntu 20.04.
Download the mythtv source and run w64-mingw32MythBuild_MXE in mythtv/platform/win32/
Post Reply