Connect ffmpeg to Visual Studio 2008

5.6k views Asked by At

I try to connect ffmpeg to visual c++ like this, but when I type "./configure --toolchain=msvc" I have this error:

c99wrap cl is unable to create an executable file.

If c99wrap cl is a cross-compiler, use the --enable-cross-compile option. Only do this if you know what cross compiling means.

C compiler test failed

config.log:

WARNING: pkg-config not found, library detection may fail. mktemp -u XXXXXX ./configure: line 728: mktemp: command not found WARNING: Unknown C compiler C:\c99\c99wrap cl, unable to select optimal CFLAGS check_ld cc check_cc BEGIN /tmp/ffconf..ZHENYA.500.5884.c 1 int main(void){ return 0; } END /tmp/ffconf..ZHENYA.500.5884.c C:\c99\c99wrap cl -c -o /tmp/ffconf..ZHENYA.500.5884.o /tmp/ffconf..ZHENYA.500.5884.c fatal error C1510: Cannot load language resource clui.dll. C compiler test failed.

What's the problem? Or just send me files that you got after compilation with this (I would not have asked, but I fix this two months):

./configure --toolchain=msvc

make

make install


log after changes:

   WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
Uxplas
check_ld cc
check_cc
BEGIN /tmp/ffconf.WcAVdgRZ.c
    1   int main(void){ return 0; }
END /tmp/ffconf.WcAVdgRZ.c
c99wrap cl -nologo -D_USE_MATH_DEFINES -Dinline=__inline -FIstdlib.h -Dstrtoll=_strtoi64 -c -Fo /tmp/ffconf.jQtxnkfv.o /tmp/ffconf.WcAVdgRZ.c
ffconf.WcAVdgRZ.c
ffconf.jQtxnkfv.o_converted.c
c99wrap link -o /tmp/ffconf.sPZUPuMJ.exe /tmp/ffconf.jQtxnkfv.o
link: invalid option -- o
Try `link --help' for more information.
C compiler test failed.

log from second computer:

WARNING: pkg-config not found, library detection may fail.
mktemp -u XXXXXX
./configure: line 749: mktemp: command not found
WARNING: Unknown C compiler c99wrap cl, unable to select optimal CFLAGS
check_ld cc
check_cc
BEGIN /tmp/ffconf..zhenya.500.4036.c
END /tmp/ffconf..zhenya.500.4036.c
c99wrap cl -I/local/include -c -o /tmp/ffconf..zhenya.500.4036.o /tmp/ffconf..zhenya.500.4036.c
./configure: line 749: c99wrap: command not found
C compiler test failed.

Errors:

1>ConsoleApplication1.obj : error LNK2028: ёё√ыър эр эхЁрчЁх°хээє■ ыхъёхьє (0A000039) "void __cdecl av_register_all(void)" (?av_register_all@@$$FYAXXZ) т ЇєэъЎшш "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>ConsoleApplication1.obj : error LNK2019: ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "void __cdecl av_register_all(void)" (?av_register_all@@$$FYAXXZ) т ЇєэъЎшш "int __clrcall main(cli::array<class System::String ^ >^)" (?main@@$$HYMHP$01AP$AAVString@System@@@Z)
1>c:\users\Zhenya\documents\visual studio 2012\Projects\ConsoleApplication1\Debug\ConsoleApplication1.exe : fatal error LNK1120: эхЁрчЁх°хээ√ї тэх°эшї ¤ыхьхэЄют: 2
2

There are 2 answers

2
moskito-x On BEST ANSWER

The error mktemp: command not found

Download : mktemp-1.6-2

put mktemp.exe into your msys\1.0\bin .


Look in your ffmpeg folder are present ?

  • inttypes.h
  • stdint.h
  • vsyasm.targets
  • vsyasm.txt
  • vsyasm.xml
  • copy vsyasm.txt , vsyasm.xml , vsyasm.exe to
  • yasm.txt , yasm.xml , yasm.exe

Look in your ... \VisualStudio??\VC\bin folder are present ?

  • vsyasm.targets
  • vsyasm.txt
  • vsyasm.xml
  • vsyasm.exe
  • copy vsyasm.txt , vsyasm.xml , vsyasm.exe to
  • yasm.txt , yasm.xml , yasm.exe

so you have both vsyasm and yasm !


If in your config.log the last line is something like c99wrap cl ... bad file number

you should download another c99-to-c89 .

get it from here

Search for previously installed files and delete them .

c99wrap.exe
c99conv.exe
makedef

copy the new files to the Visual Studio bin folder .

now ./configure --toolchain=msvc should run without problems .

Note :
make problem :
Tell me how far you come with make . I'm sure you get an gawk : unterminated string error.

0
themadmax On

To build (either c99wrap.exe or FFmpeg/Libav itself), make sure that you’re not using the msys linker, but instead the MSVS linker. For now, temporarily backup /usr/bin/link to someplace so it’s not in your $PATH.

source https://blogs.gnome.org/rbultje/2012/09/27/microsoft-visual-studio-support-in-ffmpeg-and-libav/comment-page-1/#comment-367