[FFmpeg-devel] [patch] Fix compilation error for C++ users
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.
On Tue, May 18, 2010 at 3:32 PM, Ronald S. Bultje <rsbultje at gmail.com>wrote:
> 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
> > 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.
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 794 bytes
Desc: not available
More information about the ffmpeg-devel