mingw64下為ffmpeg編譯gnutls小結
軟體包官方地址:https://gnutls.org/
筆者採用版本為 gnutls-3.5.19,編譯過程中遇到的2個問題
1)合理使用自帶openssl / libunistring / libtasn1庫函式,減少對外部第三方庫的依賴,選項引數(紅色標註)如下
--enable-local-libopts --enable-openssl-compatibility --with-nettle-mini --with-included-unistring --with-included-libtasn1 --enable-silent-rules --without-p11-kit --without-tpm --without-p11-kit --without-tpm --without-idn --without-libidn2 --disable-tools --disable-gtk-doc --disable-gcc-warnings --disable-non-suiteb-curves --disable-full-test-suite --disable-tests --disable-doc --disable-manpages --disable-gtk-doc-html --with-libiconv-prefix=$(OPENSDK_PATH) --with-libz-prefix=$(OPENSDK_PATH) |
2)gnutls.pc執行遇到的問題
誠如下面report bug所描述,但是在本機上執行的結果 gnutls.pc -lcrypt32並沒有真正生效,檔案中出現了重複一個-lws2_32。為了先保證編譯通過,仍然可以按照下述方法做相容。真正解決問題,還需gnutls本身。
I'm cross-compiling FFmpeg with GnuTLS (on Windows using Cygwin, MinGW and GCC) for TLS 1.2 support. [email protected]@ Name: GnuTLS @[email protected] Cflags: -I${includedir} or configure FFmpeg with --extra-libs=-lcrypt32 to correct this. In 'lib/Makefile.am' I did notice: if WINDOWS and in 'lib/.libs/libgnutls.lai' I did notice: # Libraries that this one depends upon. but as FFmpeg only checks the pkg-config file, I believe 'gnutls.pc.in' is this case is in need of an update. |