[Ffmpeg-devel] Compiler and linker errors with avcodec_sample_0.4.9

Rescalli Alessandro ARescalli
Fri Mar 31 13:06:17 CEST 2006


Hello, I'm using Microsoft Visual C++ 6 (on Windows XP) to build an application using ffmpeg v0.4.9. I tried to compile the libraries with mingw-msys with installation instruction contained in ffmpeg zip package. 
The compiling operation created ffmpeg.exe, avcodec.lib and avformat.lib but no avformat.dll neither avcodec.dll (using make option --enabled-shared).
I tried to run example av_codec_sample0.4.9.cpp from ffmpeg website (I included the lib files either with "pragma lib" directive, with visual studio linker options and including statically the .h files). First of all compiler seems to need inttypes.h (I downloaded it, but I'm not sure it's a trusted version), if I include it, then I get thousand errors like these:

c:\programmi\programmazione\microsoft visual studio\vc98\include\stdint.h(33) : error C2632: 'long' followed by 'long' is illegal
...................
...................
c:\programmi\programmazione\microsoft visual studio\vc98\include\avformat.h(48) : warning C4305: '=' : truncation from 'const __int64' to 'long'
...................
...................
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(23) : error C2146: syntax error : missing ';' before identifier 'Type'
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(23) : error C2501: 'BYTE' : missing storage-class or type specifiers
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(23) : error C2501: 'Type' : missing storage-class or type specifiers
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(24) : error C2146: syntax error : missing ';' before identifier 'TextLength'
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(24) : error C2501: 'BYTE' : missing storage-class or type specifiers
...................
...................
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(30) : error C2501: 'DWORD' : missing storage-class or type specifiers
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(30) : error C2501: 'NtpTimestampFrac' : missing storage-class or type specifiers
...................
...................
c:\programmi\programmazione\microsoft visual studio\vc98\include\rtp.h(40) : error C2501: 'InterarrivalJitter' : missing storage-class or type specifiers
c:\programmi\programmazione\microsoft visual studio\vc98\include\avformat.h(489) : fatal error C1083: Cannot open include file: 'rtsp.h': No such file or directory
avcodec.c
c:\programmi\programmazione\microsoft visual studio\vc98\include\stdint.h(33) : error C2632: 'long' followed by 'long' is illegal

c:\programmi\programmazione\microsoft visual studio\vc98\include\inttypes.h(258) : error C2054: expected '(' to follow '__inline__'
c:\programmi\programmazione\microsoft visual studio\vc98\include\inttypes.h(259) : error C2085: 'imaxabs' : not in formal parameter list
c:\programmi\programmazione\microsoft visual studio\vc98\include\inttypes.h(259) : error C2143: syntax error : missing ';' before '{'
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(35) : error C2054: expected '(' to follow 'inline'
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(35) : error C2085: 'av_cmp_q' : not in formal parameter list
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(35) : error C2143: syntax error : missing ';' before '{'
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(43) : error C2054: expected '(' to follow 'inline'
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(43) : error C2085: 'av_q2d' : not in formal parameter list
d:\documenti\progetti cpp\provaincludilibrerie\rational.h(43) : error C2143: syntax error : missing ';' before '{'
d:\documenti\progetti cpp\provaincludilibrerie\avcodec.c(64) : warning C4013: 'memset' undefined; assuming extern returning int
d:\documenti\progetti cpp\provaincludilibrerie\avcodec.c(106) : warning C4047: '=' : 'struct private_handle ** ' differs in levels of indirection from 'struct private_handle *'
d:\documenti\progetti cpp\provaincludilibrerie\avcodec.c(121) : warning C4047: '=' : 'struct private_handle ** ' differs in levels of indirection from 'struct private_handle *'
d:\documenti\progetti cpp\provaincludilibrerie\avcodec.c(137) : warning C4047: '=' : 'struct private_handle ** ' differs in levels of indirection from 'struct private_handle *'
d:\documenti\progetti cpp\provaincludilibrerie\avcodec.c(166) : warning C4047: '=' : 'int *' differs in levels of indirection from 'const int

How you can see I get errors in ffmpeg files but also in visual studio standard include files (rtp.h for example)... 
Can anyone help me? Has anyone got similar errors and how has resolved them?

Thanks all

Alessandro




More information about the ffmpeg-devel mailing list