Open Giulio-Ladu opened 9 years ago
Have you tried the buildffmpeg.bat script? It will pass the right parameters to build FFmpeg if your using the submodule in the project.
Also if you can look at config.log that would help figure out what's failing.
Thanks
Hi there, Thanks for quick reply! I did try the batch file, and got the same problem..
this is the problem from the config.log
WARNING: Unknown C compiler c99wrap cl, unable to select optimal CFLAGS check_ld cc check_cc BEGIN ./ffconf.0J5ekFjp.c 1 int main(void){ return 0; } END ./ffconf.0J5ekFjp.c c99wrap cl -MD -DWINAPI_FAMILY=WINAPI_FAMILY_PC_APP -D_WIN32_WINNT=0x0603 -c -o ./ffconf.HhEkGEuc.o ./ffconf.0J5ekFjp.c ../../../configure: line 841: c99wrap: command not found C compiler test failed.
I am not too great with C++, so do not know if this is something I can fix, or if it is a config error Any help would be greatly received Thanks
Do you know what this c99wrap is? Can you describe a little bit more of your development environment?
Hi, I am not to sure, I have just followed the directions given on this site: https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
I have got to the part Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio) And as mentioned earlier I got to this part --prefix=../../../Build/Windows8.1/x64 I don't even get to the next line without it throwing an error
Can you confirm which version of Visual Studio you have installed? After you have setup your environment can you run cl /? Also can you send me a copy of your environment variables also that might help identify what might be causing the issue. Thanks.
Thanks again for your help I have installed Visual Studio 2013 pro, c/c++ compiler version 18.00.31101 What environment Variables would you like to check?
I added the following SET LIB=%VSINSTALLDIR%VC\lib\store\amd64;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%WindowsSdkDir%lib\winv6.3\um\x64;; SET LIBPATH=%WindowsSdkDir%References\CommonConfiguration\Neutral;;%VSINSTALLDIR%VC\atlmfc\lib\amd64;%VSINSTALLDIR%VC\lib\amd64; SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%WindowsSdkDir%Include\um;%WindowsSdkDir%Include\shared;%WindowsSdkDir%Include\winrt;;
As instructed by the tutorial
Does any of that help? Can I provide anymore information?
Thanks, looking at the configure, the wrong CL is being invoked during the configuration stage:
# Check whether the current MSVC version needs the C99 converter.
# From MSVC 2013 (compiler major version 18) onwards, it does actually
# support enough of C99 to build ffmpeg. Default to the new
# behaviour if the regexp was unable to match anything, since this
# successfully parses the version number of existing supported
# versions that require the converter (MSVC 2010 and 2012).
cl_major_ver=$(cl 2>&1 | sed -n 's/.*Version \([[:digit:]]\{1,\}\)\..*/\1/p')
if [ -z "$cl_major_ver" ] || [ $cl_major_ver -ge 18 ]; then
cc_default="cl"
else
cc_default="c99wrap cl"
fi
cc_default="c99wrap cl"
From your build environment can you run:
which cl
as well as the output of your path set PATH
Hi thanks for hanging on with me ( I am new to this and trying to learn) So if I run cl / mysys64 I get /c/Program Files (x86)/Microsoft Visual Studio 14.0/VC/BIN/x86_ARM/cl Is it running in VS2015 environment?
Is there a way I can change it?
Or should there be any amendments to the instructions if you have multiple versions of visual studio running?
No problem, we understand that not everyone is used to the Windows environment and we are trying to understand the roadblocks that developers hit and try to figure out how to make those less painful.
I have been running this with VS 2010, 2012, 2013 and 2015 installed. The real gotcha is making sure that you don't have the wrong compiler in your path when you open the tools shortcut. Also are you launching the proper Visual Studio environment shortcut?
Sorry please excuse my n00b'ness When I launch the FFmpegWin8.1.sln I make sure it is running in VS2013, I then try to build the FFmegInterop project I get the error
Error 1 error C1083: Cannot open include file: 'libavformat/avformat.h': No such file or directory (C:\Test\FFmpegInterop\FFmpegInterop\Source\H264AVCSampleProvider.cpp) c:\work\ffmpeginterop\ffmpeginterop\source\mediasampleprovider.h
Which I am guessing means that even after using the batch file the ffmpeg is still not built. Is that what you mean?
Thanks again
You don't have to apologize for the questions. We appreciate the feedback.
If you fail to build FFmpeg itself, then FFmpegInterop will not have it for the required headers and dependencies.
Can you open a clean command prompt (run CMD) and show the PATH environment variable.
I get the following: C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%USERPROFILE%.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\VisualSVN\bin
thanks again
Hi @Giulio-Ladu, after launching VS2013 x64 Cross Tools Command Prompt, could you run the following command in your command prompt and share the output?
where cl
where link
cl
link
By the way, VS2013 installation typically put this shortcut in C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts
A sample output I got in my machine is:
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>where cl
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>where link
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>cl
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x64
Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>link
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation. All rights reserved.
usage: LINK [options] [files] [@commandfile]
Thanks for your time, This is the result of performing the tasks you ask
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>where cl C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\cl.exe C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>where link C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>cl Microsoft (R) C/C++ Optimizing Compiler Version 18.00.31101 for x64 Copyright (C) Microsoft Corporation. All rights reserved.
usage: cl [ option... ] filename... [ /link linkoption... ]
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64>link Microsoft (R) Incremental Linker Version 12.00.31101.0 Copyright (C) Microsoft Corporation. All rights reserved.
usage: LINK [options] [files] [@commandfile]
Looks good to me. After launching MSYS2 Shell from that command prompt, could you please share the output of the following command? (From the newly opened MSYS2 Shell that may take a while to open)
where cl
where link
echo $LIB
echo $LIBPATH
echo $INCLUDE
Hi sorry for delay was getting late/early here in UK!
$ where cl C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\cl.exe C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
dev@laptop MSYS ~ $ where link C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_amd64\link.exe C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\link.exe
dev@laptop MSYS ~ $ echo $LIB C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\lib\winv6.3\um\x64;
dev@laptop MSYS ~ $ echo $LIBPATH C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\LIB\amd64;C:\Program Files (x86)\Windows Kits\8.1\References\CommonConfiguration\Neutral;C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Microsoft.VCLibs\12.0\References\CommonConfiguration\neutral;
dev@laptop MSYS ~ $ echo $INCLUDE C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\8.1\include\shared;C:\Program Files (x86)\Windows Kits\8.1\include\um;C:\Program Files (x86)\Windows Kits\8.1\include\winrt;
Thanks. That all looks good. Can you clean out the FFmpeg output and build directories and try the BuildFFmpeg script for Win8.1 and x64?
Sorry build scripts? Run in visual studio
FFmpegInterop builds in Visual Studio, but it needs a built version of FFmpeg that is built through the wiki instructions or by running BuildFFmpeg which is in the root of the sources for FFmpegInterop
Ah sorry sure ok cool will try that now
Hi @Giulio-Ladu. The cl and link path look good. However, your LIB path seems to point to a non store lib. I.e. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\LIB\amd64
It should point to C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\store\amd64
after you set the environment variables before launching MSYS2 Shell.
Not sure if this will change the outcome but maybe worth trying. My setup still build without any issue. Can you share your FFmpeg revision and MSYS2 version as well?
Sorry was compiling Seems I am missing something, as I have 80 errors such as Error 1 error C1083: Cannot open include file: 'libavformat/avformat.h': No such file or directory (C:\Work\FFmpegInterop\FFmpegInterop\Source\FFmpegReader.cpp) c:\work\ffmpeginterop\ffmpeginterop\source\mediasampleprovider.h 24 1 FFmpegInterop.WindowsPhone
My FFmpeg version is 2.8
and mysys2-x86_64-20150916
Hi @Giulio-Ladu. The compiler errors you got above is from Visual Studio when compiling FFmpegInterop. But before you can build that project, you need a Windows Store/Windows Phone specific FFmpeg binaries that can be built by following the instruction below: https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT
After building these binaries, you will have the following:
C:\Work\FFmpegInterop\
ffmpeg\
Build\
Windows8.1\
x64\
bin\
avcodec.lib
avcodec-56.dll
bin\
libavformat\
avformat.h
etc
ok so I have compiled it but I don't have the bin file
The bin directories get created when you do make install, not just make. It will take the built binaries and headers and copy them to the build directory.
I don't understand what I can be doing wrong? I have called the make install command saw it build, but not getting any bin files which implies that it is not building correctly!
Can you share your build logs?
Hello!
I have a problem similar than that. I try to build the bin directory with the command buildffmpeg.bat win10. After that, it seems that it doesn't work and don't create the bin folders but generate a lot of processing at the screen with always in it the result bash : ../../../configure: No such file or directory Just before the make command and make install that failed too after...
So, I try too with the following in my directory Output/Windows/x64 with MSYS2 Shell :
$../../../configure \
--toolchain=msvc \ --disable-programs \ --disable-d3d11va \ --disable-dxva2 \ --arch=x86_64 \ --enable-shared \ --enable-cross-compile \ --target-os=win32 \ --extra-cflags="-MD -DWINAPI_FAMILY=WINAPI_FAMILY_APP -D_WIN32_WINNT=0x0A00" \ --extra-ldflags="-APPCONTAINER WindowsApp.lib" \ --prefix=../../../Build/Windows10/x64 bash : ../../../configure: No such file or directory
Same result!!! Do I need to set gas-preprocessor Setup and YASM Setup and armasm? I didn't do them so maybe it's because of that?where yasm
Thanks for helping me. I use Visual Studio 2015, with Windows 10 x64.
I also encountered the problem. It turns out that the environment setting suggested by https://trac.ffmpeg.org/wiki/CompilationGuide/WinRT is outdated. Specifically:
SET LIB=%VSINSTALLDIR%VC\lib\store;%VSINSTALLDIR%VC\atlmfc\lib;%UniversalCRTSdkDir%lib\%UCRTVersion%\ucrt\x86;;%UniversalCRTSdkDir%lib\%UCRTVersion%\um\x86;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\lib\um\x86;;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Lib\um\x86
SET LIBPATH=%VSINSTALLDIR%VC\atlmfc\lib;%VSINSTALLDIR%VC\lib;
SET INCLUDE=%VSINSTALLDIR%VC\include;%VSINSTALLDIR%VC\atlmfc\include;%UniversalCRTSdkDir%Include\%UCRTVersion%\ucrt;%UniversalCRTSdkDir%Include\%UCRTVersion%\um;%UniversalCRTSdkDir%Include\%UCRTVersion%\shared;%UniversalCRTSdkDir%Include\%UCRTVersion%\winrt;C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um;
I fixed the problem by manually checking all the entries above are correctly set.
For example, here C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\Include\um
does not exist on my PC. The version of NETFXSDK I have is C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\Include\um
.
Hi there, I am currently on the section labelled Windows Store 8.1 x64 (Windows 8.1 x64 in Visual Studio) After creating the directories I have the following : FFmpegInterop>ffmpeg>Output>Windows8.1>x64 When I try the following: $ ../../../configure \
If you think configure made a mistake, make sure you are using the latest version from Git. If the latest version fails, report the problem to the ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solve the problem.
I have tried updating the ffmpeg file using the following git clone git://source.ffmpeg.org/ffmpeg.git but I still get the same error? Is this something I am doing wrong or is there currently a problem? Thanks