mp4v2使用mingw编译配置

备注:黄色部分为原始语句,红色部分为修改后的语句

  ‘-’表示去掉,‘+’表示增加

1.修改configure文件

1)去掉enable_shared=no

*-*-mingw*)
# do not support shared
- enable_shared=no

2)搜索X_libmp4v2_la_LDFLAGS,在如下位置增加mingw的相应设置

*-*-cygwin*) 
X_libmp4v2_la_LDFLAGS='-no-undefined'
;;
+ *-*-mingw*)
+ X_libmp4v2_la_LDFLAGS='-no-undefined'
+ ;;


2.修改include/platform.h

#ifndef MP4V2_NO_STDINT_DEFS
-    #if defined( _WIN32 ) && !defined( __MINGW32
+    #if defined( _WIN32 ) && (_MSC_VER < 1800) && !defined(_MSC_STDINT_H_) && !defined( __MINGW32__ )

-#if defined( _WIN32 ) || defined( __MINGW32__ )
+#if defined( _WIN32 ) && !defined( __MINGW32__ )
# if defined( MP4V2_EXPORTS )
# define MP4V2_EXPORT __declspec(dllexport)
# elif defined( MP4V2_USE_DLL_IMPORT ) || !defined( MP4V2_USE_STATIC_LIB )

3.mingw编译

./configure --prefix=/d/third-party/mp4v2/install

make

make install
原文地址:https://www.cnblogs.com/ziyu-trip/p/7074859.html