QtAV
QtAV copied to clipboard
Config tests fail when linking against FFmpeg 4.3
QtAV, Qt version and platform
QtAV latest Windows 10 x64 Qt 5.15.0 x64 VS 2019 ffmpeg-4.3-desktop-VS2019-lite
When linking against FFmpeg 4.3 config tests fail with the following error log:
Log file
executing config test avutil
+ cd /d C:\build-QtAV-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug\config.tests\avutil && C:\Qt\5.15.0\msvc2019_64\bin\qmake.exe -spec C:/Qt/5.15.0/msvc2019_64/mkspecs/win32-msvc "CONFIG -= qt debug_and_release app_bundle lib_bundle" C:/QtAV/config.tests/avutil
+ cd /d C:\build-QtAV-Desktop_Qt_5_15_0_MSVC2019_64bit-Debug\config.tests\avutil && set MAKEFLAGS=& nmake
> Microsoft (R) Program Maintenance Utility Version 14.26.28806.0
> Copyright (C) Microsoft Corporation. All rights reserved.
> cl -c -nologo -Zc:wchar_t -FS -Zc:rvalueCast -Zc:inline -Zc:strictStrings -Zc:throwingNew -Zc:referenceBinding -Zc:__cplusplus -O2 -MD -W3 -w34100 -w34189 -w44996 -w44456 -w44457 -w44458 -wd4577 -wd4467 -EHsc -DUNICODE -D_UNICODE -DWIN32 -D_ENABLE_EXTENDED_ALIGNED_STORAGE -DWIN64 -D__STDC_CONSTANT_MACROS -DNDEBUG -D_WINDLL -IC:\QtAV\config.tests\avutil -I. -IC:\QtAV\ffmpegBin\win\64\include -IC:\QtAV\src\compat\msvc -IC:\Qt\5.15.0\msvc2019_64\include -IC:\QtAV\src\compat\msvc -IC:\QtAV\contrib\dxsdk -IC:\Qt\5.15.0\msvc2019_64\mkspecs\win32-msvc -Fo @C:\Users\afshar\AppData\Local\Temp\nm1C3.tmp
> main.cpp
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(306): error C2065: 'INT64_MAX': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(307): error C2065: 'INT64_MAX': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(308): error C2065: 'INT64_MIN': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(309): error C2065: 'INT64_MIN': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(326): error C2065: 'INT64_MAX': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(327): error C2065: 'INT64_MAX': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(328): error C2065: 'INT64_MIN': undeclared identifier
> C:\QtAV\ffmpegBin\win\64\include\libavutil\common.h(329): error C2065: 'INT64_MIN': undeclared identifier
> NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.26.28801\bin\HostX64\x64\cl.EXE"' : return code '0x2'
> Stop.
test avutil FAILED
set environment var `QTAV_LOG=all` or C++ api `QtAV::setLogLevel(All)` to enable log.
For Player and QMLPlayer example app, choose log level `all` in config page.
Linking against FFmpeg 4.2 works as expected with no errors. Any hints?
Happening to me as well. Need to build QtAV linking to ffmpeg supporting decklink devices, but fails at the same point with the same error
You can make it build with a workaround: Add
#include <intsafe.h>
to the file libavutil/common.h, alongside the other includes.