[FFmpeg-devel] [patch] Fix compilation error for C++ users

rdb ffmpeg
Tue May 18 18:10:41 CEST 2010


Hm, what is the explanation for this? Can you perhaps link me to relevant
discussion? From the relevant manual page (
http://linux.die.net/man/3/uint64_c), it seems that one does need to define
this macro before including stdint.h; in order to get the right macro
definitions in C++ code.

Also, I just realised I made a big mistake in the patch - it should be
__STDC_CONSTANT_MACROS, not __STDC_LIMIT_MACROS. My apologies, I was kinda
low on coffee. Attached is a fixed version of the patch.

Kind regards,
rdb

On Tue, May 18, 2010 at 3:32 PM, Ronald S. Bultje <rsbultje at gmail.com>wrote:

> Hi,
>
> On Tue, May 18, 2010 at 9:26 AM, rdb <ffmpeg at rdb.name> wrote:
> > The attached patch fixes an issue that C++ users get when they try to
> > include avutil/common.h.
> > The file uses UINT64_C, which in the case of C++ is only available when
> > __STDC_LIMIT_MACROS is defined.
> > It also includes a minor fix for a C++-style comment that I spotted in
> that
> > file. ;-)
>
> We've discussed this before, it's a c++ bug (or g++ bug, if you so wish).
>
> Your best choice is to add -D__STDC_LIMIT_MACROS to your CFLAGS when
> compiling your c++ application.
>
> Ronald
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: correct_fix_for_cpp.patch
Type: text/x-patch
Size: 794 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100518/d8b24ac6/attachment.bin>



More information about the ffmpeg-devel mailing list