or you can use the gcc not g++,because stdint.h defines UINT64_C only for C
program and not C++ program.

On Wed, Jun 30, 2010 at 1:33 PM, yi nianhua <[email protected]> wrote:

> add this in common.h, and recompile it,maybe it will be resovled.
> #ifndef INT64_C
> #define INT64_C(c) (c ## LL)
> #define UINT64_C(c) (c ## ULL)
> #endif
>
> On Wed, Jun 30, 2010 at 12:51 PM, S R <[email protected]> wrote:
>
>> Hi
>>
>> It gives the same problem. Actually my code compiles properly in a
>> previous
>> version of ffmpeg but gives problem in this version. The problem is not
>> with
>> coding as is clear below. There is some bug in the SVN version I
>> downloaded.
>>
>> I tried this command:
>>
>> g++ -Wall -Wconversion -g -fPIC api-example.c -o api-example -lavformat
>> -lavcodec -lavutil -lswscale -lz -lbz2 -lm
>>
>>
>> This is what I get:
>>
>> In file included from /usr/local/include/libavutil/avutil.h:81,
>>                 from /usr/local/include/libavcodec/avcodec.h:30,
>>                 from api-example.c:38:
>> /usr/local/include/libavutil/common.h: In function ‘int32_t
>> av_clipl_int32(int64_t)’:
>> /usr/local/include/libavutil/common.h:165: error: ‘UINT64_C’ was not
>> declared in this scope
>> api-example.c: In function ‘void audio_encode_example(const char*)’:
>> api-example.c:82: error: invalid conversion from ‘void*’ to ‘short int*’
>> api-example.c:84: error: invalid conversion from ‘void*’ to ‘uint8_t*’
>> api-example.c:94: warning: conversion to ‘float’ from ‘double’ may alter
>> its
>> value
>> api-example.c:97: warning: conversion to ‘short int’ from ‘int’ may alter
>> its value
>> api-example.c: In function ‘void audio_decode_example(const char*, const
>> char*)’:
>> api-example.c:145: error: invalid conversion from ‘void*’ to ‘uint8_t*’
>> api-example.c: In function ‘void video_encode_example(const char*)’:
>> api-example.c:246: error: invalid conversion from ‘void*’ to ‘uint8_t*’
>> api-example.c:248: error: invalid conversion from ‘void*’ to ‘uint8_t*’
>> api-example.c:264: warning: conversion to ‘unsigned char’ from ‘int’ may
>> alter its value
>> api-example.c:271: warning: conversion to ‘unsigned char’ from ‘int’ may
>> alter its value
>> api-example.c:272: warning: conversion to ‘unsigned char’ from ‘int’ may
>> alter its value
>>
>>
>>
>>
>> On Wed, Jun 30, 2010 at 11:31 AM, yi nianhua <[email protected]
>> >wrote:
>>
>> > you can try to complie api_example.c,and see if it works well.
>> >
>> > On Wed, Jun 30, 2010 at 10:05 AM, S R <[email protected]> wrote:
>> >
>> > > Hi All
>> > >
>> > > Can anyone please help with this problem? Need this urgently.
>> > >
>> > > Thanks in advance
>> > >
>> > >
>> > >
>> > > On Wed, Jun 30, 2010 at 1:13 AM, S R <[email protected]> wrote:
>> > >
>> > > >
>> > > > Hi
>> > > >
>> > > > I keep getting this error as I try to compile a simple C++ code that
>> > > calls
>> > > > ffmpeg.
>> > > >
>> > > > /usr/local/include/libavutil/common.h: In function ‘int32_t
>> > > > av_clipl_int32(int64_t)’:
>> > > > /usr/local/include/libavutil/common.h:165: error: ‘UINT64_C’ was not
>> > > > declared in this scope
>> > > >
>> > > > Any idea what is wrong. I have installed the latest ffmpeg at this
>> > point
>> > > of
>> > > > time. But to no avail. The version I am using is
>> > > >
>> > > > FFmpeg version SVN-r23884, Copyright (c) 2000-2010 the FFmpeg
>> > developers
>> > > >   built on Jun 30 2010 00:59:11 with gcc 4.3.3
>> > > >   configuration: --enable-gpl --enable-version3 --enable-nonfree
>> > > > --enable-postproc --enable-pthreads --enable-libfaac
>> > --enable-libmp3lame
>> > > > --enable-libtheora --enable-libvorbis --enable-libx264
>> --enable-libxvid
>> > > > --enable-x11grab
>> > > >   libavutil     50.19. 0 / 50.19. 0
>> > > >   libavcodec    52.78. 0 / 52.78. 0
>> > > >   libavformat   52.71. 0 / 52.71. 0
>> > > >   libavdevice   52. 2. 0 / 52. 2. 0
>> > > >   libavfilter    1.20. 1 /  1.20. 1
>> > > >   libswscale     0.11. 0 /  0.11. 0
>> > > >   libpostproc   51. 2. 0 / 51. 2. 0
>> > > > FFmpeg SVN-r23884
>> > > > libavutil     50.19. 0 / 50.19. 0
>> > > > libavcodec    52.78. 0 / 52.78. 0
>> > > > libavformat   52.71. 0 / 52.71. 0
>> > > > libavdevice   52. 2. 0 / 52. 2. 0
>> > > > libavfilter    1.20. 1 /  1.20. 1
>> > > > libswscale     0.11. 0 /  0.11. 0
>> > > > libpostproc   51. 2. 0 / 51. 2. 0
>> > > > Any idea what is wrong. I saw in the website that CPPFLAGS need to
>> be
>> > > added
>> > > > with
>> > > >
>> > > > *-D__STDC_CONSTANT_MACROS*
>> > > >
>> > > > But it also says that the latest SVN has this error corrected.
>> > > >
>> > > > Please advice. Thanks for your help.
>> > > >
>> > > _______________________________________________
>> > > libav-user mailing list
>> > > [email protected]
>> > > https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>> > >
>> > _______________________________________________
>> > libav-user mailing list
>> > [email protected]
>> > https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>> >
>> _______________________________________________
>> libav-user mailing list
>> [email protected]
>> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
>>
>
>
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to