GDK交叉编译错误
GDK cross compilation error
我在 Debian 上使用 i686-w64-mingw32 交叉编译了 libpng 1.6.28、libjpeg-turbo 1.5.1 和 GLib 2.50.3 for MS Windows Stretch 到一个特殊的文件夹,但仍然可以让 gdk-pixbuf 工作。我用于配置的命令行是:
./configure --host=i686-w64-mingw32 PKG_CONFIG_PATH=/usr/local/mingw32-i686/lib/pkgconfig --prefix=/usr/local/mingw32-i686
它通过了配置部分,但问题开始于制作点。它抛出以下错误:
/usr/local/mingw32-i686/lib/libgio-2.0.a(libgio_2_0_la-giomodule.o): In function `DllMain@12':
/home/maju/GTK-build/glib-2.50.3/gio/giomodule.c:942: multiple definition of `DllMain@12'
./.libs/libgdk_pixbuf-2.0.a(libgdk_pixbuf_2_0_la-gdk-pixbuf-io.o):gdk-pixbuf-io.c:(.text+0x1ca): first defined here
collect2: error: ld returned 1 exit status
Makefile:1859: polecenia dla obiektu 'gdk-pixbuf-csource.exe' nie powiodły się
(最后一行只是 gdk-pixbuf-csource.exe 的未翻译错误消息)。
后面还有警告信息:
*** Warning: This system cannot link to static lib archive libgdk_pixbuf-2.0.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
对于每个必需的库。
谁能给我解释一下?
DllMain 可能意味着“glib for doze doesn't build static right”
这个补丁
https://lists.fedoraproject.org/pipermail/mingw/2013-March/006441.html
仍然适用于 glib 的更高版本。蹩脚的。
补丁更新版本https://bugzilla.redhat.com/show_bug.cgi?id=1306047
https://bugzilla.redhat.com/attachment.cgi?id=1122789 似乎是该补丁的最终版本,参见
https://smani.fedorapeople.org/glib-prefer-constructors-over-DllMain.patch
不确定 cannot link
,我为交叉编译配置 glib,如 --host=i686-w64-mingw32 --prefix=/Users/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 --disable-shared --enable-static --with-pcre=internal
FWIW
我在 Debian 上使用 i686-w64-mingw32 交叉编译了 libpng 1.6.28、libjpeg-turbo 1.5.1 和 GLib 2.50.3 for MS Windows Stretch 到一个特殊的文件夹,但仍然可以让 gdk-pixbuf 工作。我用于配置的命令行是:
./configure --host=i686-w64-mingw32 PKG_CONFIG_PATH=/usr/local/mingw32-i686/lib/pkgconfig --prefix=/usr/local/mingw32-i686
它通过了配置部分,但问题开始于制作点。它抛出以下错误:
/usr/local/mingw32-i686/lib/libgio-2.0.a(libgio_2_0_la-giomodule.o): In function `DllMain@12':
/home/maju/GTK-build/glib-2.50.3/gio/giomodule.c:942: multiple definition of `DllMain@12'
./.libs/libgdk_pixbuf-2.0.a(libgdk_pixbuf_2_0_la-gdk-pixbuf-io.o):gdk-pixbuf-io.c:(.text+0x1ca): first defined here
collect2: error: ld returned 1 exit status
Makefile:1859: polecenia dla obiektu 'gdk-pixbuf-csource.exe' nie powiodły się
(最后一行只是 gdk-pixbuf-csource.exe 的未翻译错误消息)。
后面还有警告信息:
*** Warning: This system cannot link to static lib archive libgdk_pixbuf-2.0.la.
*** I have the capability to make that library automatically link in when
*** you link to this library. But I can only do this if you have a
*** shared version of the library, which you do not appear to have.
*** But as you try to build a module library, libtool will still create
*** a static module, that should work as long as the dlopening application
*** is linked with the -dlopen flag to resolve symbols at runtime.
对于每个必需的库。
谁能给我解释一下?
DllMain 可能意味着“glib for doze doesn't build static right”
这个补丁 https://lists.fedoraproject.org/pipermail/mingw/2013-March/006441.html 仍然适用于 glib 的更高版本。蹩脚的。
补丁更新版本https://bugzilla.redhat.com/show_bug.cgi?id=1306047
https://bugzilla.redhat.com/attachment.cgi?id=1122789 似乎是该补丁的最终版本,参见
https://smani.fedorapeople.org/glib-prefer-constructors-over-DllMain.patch
不确定 cannot link
,我为交叉编译配置 glib,如 --host=i686-w64-mingw32 --prefix=/Users/rdp/dev/ffmpeg-windows-build-helpers/sandbox/cross_compilers/mingw-w64-i686/i686-w64-mingw32 --disable-shared --enable-static --with-pcre=internal
FWIW