操作如下:
1.首先我们要下载相关工具,这里不多说,大家按照我的地址去下载文件就好了
CODE:
[Copy to clipboard]
MINGW下载地址:http://prdownloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe?download
然后在下载MSYS :http://prdownloads.sf.net/mingw/MSYS-1.0.10.exe?download
好先喝点咖啡,哈哈
首先我们先安装一下MINGW,我的目录是c:/MINGW,默认的,然后接下来要安装MSYS
这里要有些注意,安装目录看到别人是这么说的,C:/MinGW/bin/1.0,意思就是安装在你的MINGW目录下的BIN里面
OK,开始安装吧!注意安装完毕以后有个DOS界面,这里至关重要,请谨慎操作
按照图片的操作即可,
安装好以后,我们在下载一个LAME,我不知道是干嘛用的,反正就安装吧
CODE:
[Copy to clipboard]
下载地址:http://prdownloads.sourceforge.net/lame/lame-3.97b2.tar.gz?download
然后解压到C:/MinGW/bin/1.0/lame-3.97
好了,启动桌面上的MSYS,然后出入一下代码
首先进入lame目录,呵呵
下面步骤
CODE:
[Copy to clipboard]
1.cd c:
2.cd MinGw
3.cd bin
4 cd 1.0
5.cd lame-3.97
然后开始编译,一下是步骤
CODE:
[Copy to clipboard]
1 ./configure(根据的你电脑速度决定快慢)
2. make
3. make install
好了,你可以下载FFMPEG文件进行编译了,哈哈
首先下载FFMPEG
然后解压到磁盘里面,同样使用MSYS进入该目录输入一下代码
CODE:
[Copy to clipboard]
./configure –enable-memalign-hack –enable-mingw32 –enable-mp3lame –extra-cflags=-I/local/include –extra-ldflags=-L/local/lib
执行完毕以后,在输入
CODE:
[Copy to clipboard]
make
执行完毕以后,在输入
CODE:
[Copy to clipboard]
make install
OK了吧:),如果存在问题,希望高手纠错阿
//--------------------------------------------
在编译ffmpeg-0.4.9-p20060530时,会出现下面的错误:
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x3d2): In function `main':
c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:152: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x516):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:164: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x51e):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:165: undefined reference to `ftello64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0x900):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:248: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0xe08):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:133: undefined reference to `fseeko64'
C:/DOCUME~1/admin/LOCALS~1/Temp/ccCWhaaa.o(.text+0xe2d):c:/mingw/bin/1.0/ffmpeg2/qt-faststart.c:140: undefined reference to `ftello64'
make: *** [qt-faststart.exe] Error 1
就是在文件qt-faststart.c开头找不到定义的函数fseeko64'和函数ftello64,在网上有如下帖子:
(连接):http://www.datafocus.com/docs/man3/fseek.3.asp
fseek() , fseeko() , fseeko64()reposition a stream's file pointer | Function |
SYNOPSIS
#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
int fseeko(FILE *stream, off_t offset, int whence);
int fseeko64(FILE *stream, off64_t offset, int whence);
DESCRIPTION
The fseek() function repositions a file pointer for a stream.
The fseeko() function is identical to fseek() except for the type of the offset.
The fseeko64() function is a part of the large file extensions, and is similar to fseeko() except that a larger file offset can be specified.
If the stream is writeable, and buffered data has not yet been written to the underlying file, fseek() causes the unwritten data to be written to the file, and marks the st_ctime and st_mtime fields of the file for update.
PARAMETERS
RETURN VALUES
The fseek() , fseeko() , and fseeko64() functions return 0 if they succeed; otherwise, they return -1 and errno is set to one of the following values:
-
EAGAIN
-
The O_NONBLOCK flag is set for the file descriptor underlying stream, and the process would be delayed in the write operation.
EBADF
-
The file descriptor underlying stream is not valid.
EFBIG
-
The file is a regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
EINTR
-
A signal interrupted the call.
EINVAL
-
The whence argument is invalid.
ENOSPC
-
There was no free space remaining on the device containing the file.
EOVERFLOW
-
The resulting file offset would be a value which cannot be represented correctly in an object of the requested type.
EPIPE
-
An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal is also sent to the process.
CONFORMANCE
ANSI/ISO 9899-1990.
fseeko() , fseeko64() : Large File Specification, revision 1.5.
MULTITHREAD SAFETY LEVEL
MT-Safe.
PORTING ISSUES
The file positions reported by fgetpos() , ftell() , ftello() may be incorrect for files that are open in text mode in the case that the file is being read, or the case where the file is being written to and there is buffered data which has not yet been written to the underlying file. In the case that the file is being written to, fflush() can be used prior to calling fgetpos() ftell() , or ftello() to ensure the accuracy of these functions. Text mode files with no buffering do not have this problem, however performance can be significantly degraded with buffering turned off.
AVAILABILITY
MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition
SEE ALSO
-
Miscellaneous:
- lf64
也就是说在此环境下找不到这两个函数,我在文件的开头修改如下:
#ifdef __MINGW32__
//#define fseeko(x,y,z) fseeko64(x,y,z)//deleted by Liu
#define fseeko(x,y,z) fseek(x,y,z)
//#define ftello(x) ftello64(x)//deleted by Liu
#define ftello(x) ftell(x)
#endif
这两个函数的区别在于一个便宜量为64位的,一个位32位的,感觉在一般的电脑上32位已经够用,应该不会发生问题。
望高手给于指点!