Compiler error

Jan 1, 2014 at 3:55 PM
Edited Jan 1, 2014 at 3:58 PM
Hi,

With great interest I saw your instructions on how to compile ffmpeg for Windows RT. But each time I try to run "./configure --toolchain=msvc ...other parameters" in my msys/mingw shell I get this error:
cl is unable to create an executable file.
C compiler test failed.

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
solving the problem.
"where cl.exe" returns:
$ where cl.exe
c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\x86_arm\cl.exe
c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\cl.exe
and
$ cl.exe
Microsoft (R) C/C++ Optimizing Compiler Version 18.00.21005.1 for ARM
Copyright (C) Microsoft Corporation. All rights reserved.

usage: cl [ option... ] filename... [ /link linkoption... ]
Running just "./configure" (without parameters works).
Do you have a hint how I can get this working?
Jan 2, 2014 at 10:26 AM
After some more testing, "make" stops with the following error
C:\Program Files (x86)\Windows Kits\8.1\include\um\combaseapi.h(1157) : error C4
013: 'CoCreateInstanceFromApp' undefined; assuming extern returning int
make: *** [libavformat/format.o] Error 2
Coordinator
Jan 3, 2014 at 4:38 AM
This error caused by include the <Windows.h>. In WinRT, we cannot use win32 API. Our solution is write another<Windows.h> instead of the one in SDK. In our header files, we overwriter some APIs like CreateFile Socket,ect.
Jan 3, 2014 at 6:34 AM
Can you share these modified headers as well?

Thanks!
Jan 5, 2014 at 12:53 AM
qyljcy wrote:
This error caused by include the <Windows.h>. In WinRT, we cannot use win32 API. Our solution is write another<Windows.h> instead of the one in SDK. In our header files, we overwriter some APIs like CreateFile Socket,ect.

I have the same compliler error:
file_open.c
C:\Program Files (x86)\Windows Kits\8.1\include\um\combaseapi.h(1157) : error C4013: 'CoCreateInstanceFromApp' undefined; assuming extern returning int
make: *** [libavdevice/file_open.o] Error 2
qyljcy, can you provide more specific info about solving this problem?
Coordinator
Jan 8, 2014 at 2:14 AM
VamHa wrote:
Can you share these modified headers as well?

Thanks!
Sorry, this project written by other colleague.
Coordinator
Jan 8, 2014 at 2:17 AM
First of all, we need to integrated pure-C version ffmpeg into our project. The second step is using these ARM assembly. This project cannot be used directly in WinRT.
Nov 1, 2014 at 6:21 AM
I would like to help you with the project but I am already failing when trying to compile:
$ ./build_ffmpeg_msvc.sh
Building ffmpeg in MSVC Debug config...
cl is unable to create an executable file.
C compiler test failed.

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 start the Visual Studio 2013 ARM console then run "msys". "cl" and "lib" seem to point to the Visual Studio 2013 ARM versions.
Coordinator
Nov 7, 2014 at 7:12 AM
Please check if there is cl under Mingw or msys bin folder, you should rename it.
Nov 25, 2014 at 6:35 AM
I finally got it working. The trick was to start the Visual Studio console with adminstrator privileges.