今天在用vs2010编译FFMPEG SDK的例子程序output_example.c时遇到链接问题。
后发现为需要在include的头文件处加预编译代码。
#ifdef __cplusplus // 此
extern "C" { // 处
#endif // 为
#include "libavformat/avformat.h"
#include "libswscale/swscale.h"
#ifdef __cplusplus // 添加的
} // 内容
#endif // 。