windows编译ffmpeg出现gcc is unable to create an executable file

qq398221168 2014-02-17 02:14:50
如题,按照网上的方法搭建了mingw+msys环境,编译ffmpeg
mingw装在 c:/MinGW
ffmpeg代码位置:d:/ffmpeg/ffmpeg-0.10.1
执行./configure --enable-shared --disable-static --enable-nonfree --enable-memalign-hack --enable-libmp3lame --enable-gpl --enable-libx264 --enable-libxvid --enable-libfaac --enable-libvo-aacenc --enable-version3 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --extra-cflags='-ld:/ffmpeg/ffmpeg-0.10.1/include' --extra-ldflags='-ld:/ffmpeg/ffmpeg-0.10.1/lib'

后现错误:
gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.
If you think configure made a mistake, make sure you are using the latest
version from SVN. If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.

这里贴上config.log最后一段
check_ld cc
check_cc
BEGIN /tmp/ffconf.iMtsJTOB.c
1 int main(void){ return 0; }
END /tmp/ffconf.iMtsJTOB.c
gcc -ld:/ffmpeg/ffmpeg-0.10.1/include -c -o /tmp/ffconf.rsMbqSSB.o /tmp/ffconf.iMtsJTOB.c
gcc -ld:/ffmpeg/ffmpeg-0.10.1/lib -o /tmp/ffconf.ioBipJlK.exe /tmp/ffconf.rsMbqSSB.o
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -ld:/ffmpeg/ffmpeg-0.10.1/lib
collect2.exe: error: ld returned 1 exit status
C compiler test failed.

请教各位大牛该如何解决啊
...全文
11479 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
qq_24175095 2016-03-18
  • 打赏
  • 举报
回复
出现了类似的问题;“cl is unable to create an executable file”用的是VS2013 不知道错在哪 求大神指导 想要用它编译生成一个添加了新解码器的avcodec.lib 不知道如果编译成功了之后 需要什么特殊命令才能只生成avcodec.lib
sizheng0320 2015-09-12
  • 打赏
  • 举报
回复
引用 13 楼 sjwy397218 的回复:
[quote=引用 11 楼 u011621046 的回复:] 请问谁有编译好的WINCE 下的ffmpeg库,我现在编译也遇到同样问题了 能否发一份编译好的或者共享,网上都找不到可下载的。
ffmpeg不是有发布的shared [/quote] 发布的里面没有server。不知为什么,特地把server选项关了
JuniorWY 2015-07-27
  • 打赏
  • 举报
回复
引用 11 楼 u011621046 的回复:
请问谁有编译好的WINCE 下的ffmpeg库,我现在编译也遇到同样问题了 能否发一份编译好的或者共享,网上都找不到可下载的。
ffmpeg不是有发布的shared
carvinliao 2015-07-13
  • 打赏
  • 举报
回复
$ ./configure --prefix=/mingw/ffmpeg --enable-gpl --enable-nonfree --enable-pos tproc --enable-avfilter --enable-ffplay --enable-avresample --enable-w32threads --enable-runtime-cpudetect --enable-memalign-hack --enable-bzlib --enable-libx 264 --enable-zlib --disable-debug --enable-shared --arch=x86_64 --host-os=win64 --extra-cflags=-I/mingw/ffmpeg/include --extra-ldflags=-L/mingw/ffmpeg/lib --e xtra-libs=-lfaac
shenzhenit 2015-06-08
  • 打赏
  • 举报
回复
请问谁有编译好的WINCE 下的ffmpeg库,我现在编译也遇到同样问题了 能否发一份编译好的或者共享,网上都找不到可下载的。
qq398221168 2014-03-25
  • 打赏
  • 举报
回复
感谢 neustar1,
__cc__ 2014-02-21
  • 打赏
  • 举报
回复
引用 8 楼 qq398221168 的回复:
终于解决了,原来是--extra-cflags='-ld:/ffmpeg/ffmpeg-0.10.1/include' --extra-ldflags='-ld:/ffmpeg/ffmpeg-0.10.1/lib'个地方原来是--extra-cflags='-ld:/ffmpeg/ffmpeg-0.10.1/include' 大写的I写成了小写的L ,是路径错了
说的就是这个意思,l链接的是一个库,你写成目录肯定不对了。
qq398221168 2014-02-20
  • 打赏
  • 举报
回复
终于解决了,原来是--extra-cflags='-ld:/ffmpeg/ffmpeg-0.10.1/include' --extra-ldflags='-ld:/ffmpeg/ffmpeg-0.10.1/lib'个地方原来是--extra-cflags='-ld:/ffmpeg/ffmpeg-0.10.1/include' 大写的I写成了小写的L ,是路径错了
qq398221168 2014-02-20
  • 打赏
  • 举报
回复
/ffmpeg/ffmpeg-0.10.1/lib 这个是MSYS下的local目录编译出的其他的LIB库文件 ,我拷了一份到/ffmpeg/ffmpeg-0.10.1下,有什么问题吗
qq398221168 2014-02-19
  • 打赏
  • 举报
回复
试过 不行 ,我觉得应该是参数错了 有没有大牛能指出来啊
__cc__ 2014-02-19
  • 打赏
  • 举报
回复
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: cannot find -ld:/ffmpeg/ffmpeg-0.10.1/lib 这个地方错了,/ffmpeg/ffmpeg-0.10.1/lib 这个是目录?
alexander_david 2014-02-17
  • 打赏
  • 举报
回复
把网线拔掉,把杀毒软件关闭,可能是杀毒软件误判。
qq398221168 2014-02-17
  • 打赏
  • 举报
回复
大牛们来啊 啊 啊啊 啊
qq398221168 2014-02-17
  • 打赏
  • 举报
回复
没有人遇到和我一样的问题么
qq398221168 2014-02-17
  • 打赏
  • 举报
回复
跪求大牛帮忙指导一下

2,542

社区成员

发帖
与我相关
我的任务
社区描述
专题开发/技术/项目 多媒体/流媒体开发
社区管理员
  • 多媒体/流媒体开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧