0

I need help compiling "http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html" using visual studio express 2013.

I followed the solution indicated in "Use FFmpeg in Visual Studio", however I still get the message "error C1189: #missing -D__STDC_CONSTANT_MACROS / #define __STDC_CONSTANT_MACROS

Thanks,

Community
  • 1
  • 1
jax
  • 840
  • 2
  • 17
  • 35

1 Answers1

0

Please try it, it should work.

#include <math.h>
extern "C" {
    #ifndef __STDC_CONSTANT_MACROS
    #define __STDC_CONSTANT_MACROS
    #endif

    #include <libavutil/opt.h>
    #include <libavcodec/avcodec.h>
    #include <libavutil/channel_layout.h>
    #include <libavutil/common.h>
    #include <libavutil/imgutils.h>
    #include <libavutil/mathematics.h>
    #include <libavutil/samplefmt.h>
}
lorond
  • 3,856
  • 2
  • 37
  • 52
Evan Lin
  • 1,272
  • 1
  • 12
  • 25
  • Why do you include the `extern "C"`? The files can be included from any C file without it, and you can setup a VC project with a C main file. – harper Dec 29 '14 at 10:47