FFmpegInterop: cl is unable to create an executable file.
Followed the guide
Configure throws:
cl is unable to create an executable file. C compiler test failed.
$ which link
/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/link
$ which cl
/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64/cl
$ echo $PATH
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE/CommonExtensions/Microsoft/TestWindow:/c/Program Files (x86)/MSBuild/14.0/bin:/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/IDE:/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_amd64:/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN:/c/Program Files (x86)/Microsoft Visual Studio 14.0/Common7/Tools:/c/WINDOWS/Microsoft.NET/Framework/v4.0.30319:/c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/VCPackages:/c/Program Files (x86)/HTML Help Workshop:/c/Program Files (x86)/Microsoft Visual Studio 14.0/Team Tools/Performance Tools:/c/Program Files (x86)/Windows Kits/8.1/bin/x86:/c/Program Files (x86)/Microsoft SDKs/Windows/v10.0A/bin/NETFX 4.6 Tools:/c/ProgramData/Oracle/Java/javapath:/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64/compiler:/c/WINDOWS/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files (x86)/QuickTime/QTSystem:/c/Program Files (x86)/Livestreamer:/c/Program Files (x86)/Windows Kits/8.1/Windows Performance Toolkit:/c/Program Files (x86)/GtkSharp/2.12/bin:/c/Program Files/nodejs:/c/Program Files (x86)/Skype/Phone:/c/Program Files/OpenVPN/bin:/c/Program Files/Common Files/Autodesk Shared:/c/Program Files (x86)/Autodesk/Backburner:/c/Users/coral/AppData/Local/Programs/Python/Python35/Scripts:/c/Users/coral/AppData/Local/Programs/Python/Python35/ :/c/ffmpeg/bin:/c/Users/coral/AppData/Roaming/npm:/c/Users/coral/AppData/Local/Programs/Git/cmd:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
About this issue
- Original URL
- State: open
- Created 8 years ago
- Comments: 24 (7 by maintainers)
I ran into this problem recently and found this issue at the top of Google, so I figured I’d drop this here for any future pioneers building FFMPEG in this manner, following this guide
https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
The problem with that guide is when it tells you to set some environment variables in the command prompt before launching the MSYS2 shell, to build the actual code (ffmpeg). Specifically This. Friggin. Step.
First of all, those paths may not even resolve to anything so double check. in my case %VSINSTALLDIR% wasn’t even defined. These paths also vary depending on which version of VS you have, and which version of the build tools. For example:
was flat out wrong. I had to change it to
to actually point it to the right place
Anyways, root cause is likely this: it can’t compile because it can’t find the dang libs or headers, cause the Include And Lib paths are likely borked, so double check those paths before building anything. Daggum
Hi @arn0dre
It looks like link in your path is the one from MSYS and not from Visual Studio. From the instructions on https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT You might have missed this following step:
Rename or remove link.exe in the MSYS2 usr bin folder (E.g. C:\msys64\usr\bin\link.exe) to prevent conflict with MSVC link.exeI’m getting the same problems in a different project while building libav on Windows, but running this command from msys2 root folder solved the
clproblem for me!Hi @DaweiX,
Can you open FFmpegConfig.sh and copy the command-line to build FFmpeg and see if that works? If cl is not found that’s usually a sign that the path is not properly passed to MSys2.
I installed pkg-config with
pacman -S pkg-config, but still I’m unable to build.config.log
in BuildFFmpeg.bat I also set the MSYS2_PATH_TYPE=inherit
Visual Studio Community 2015, Win 10