2013-12-11 178 views
0

我需要幫助編制「http://cekirdek.pardus.org.tr/~ismail/ffmpeg-docs/api-example_8c-source.html」使用Visual Studio速成2013年編譯FFMPEG在Visual Studio 2013

我跟着「Use FFmpeg in Visual Studio」指示的解決方案,但是我仍然得到消息,「錯誤C1189:#missing請-D__STDC_CONSTANT_MACROS /#定義__STDC_CONSTANT_MACROS

感謝,

+0

@ronag如何以及在哪裏? – jax

+1

http://www.ffmpeg.org/platform.html#Microsoft-Visual-C_002b_002b-or-Intel-C_002b_002b-Compiler-for-Windows –

回答

0

請您嘗試一下,它應該工作。

#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> 
} 
+0

爲什麼包含'extern「C」'?沒有它的文件可以從任何C文件中包含,並且您可以使用C主文件設置VC項目。 – harper

相關問題