OSDN Git Service

doc: explain __STDC_CONSTANT_MACROS in C++
authorLuca Barbato <lu_zero@gentoo.org>
Sat, 10 Sep 2011 14:23:50 +0000 (10:23 -0400)
committerLuca Barbato <lu_zero@gentoo.org>
Sat, 10 Sep 2011 19:21:22 +0000 (15:21 -0400)
In order to build C++ programs using libav you need
-D__STDC_CONSTANT_MACROS appened to the CXXFLAGS.

doc/faq.texi

index 42a135c..affe88b 100644 (file)
@@ -440,6 +440,11 @@ encompassing your Libav includes using @code{extern "C"}.
 
 See @url{http://www.parashift.com/c++-faq-lite/mixing-c-and-cpp.html#faq-32.3}
 
+@section I'm using libavutil from within my C++ application but the compiler complains about 'UINT64_C' was not declared in this scope
+
+Libav is a pure C project using C99 math features, in order to enable C++
+to use them you have to append -D__STDC_CONSTANT_MACROS to your CXXFLAGS
+
 @section I have a file in memory / a API different from *open/*read/ libc how do I use it with libavformat?
 
 You have to implement a URLProtocol, see @file{libavformat/file.c} in