我想使用mingw在ubuntu 13.04 32位主机上交叉编译libtheora for windows 64bit。
我安装了mingw:
sudo apt-get install gcc-mingw-w64-x86-64
下载并解压缩libogg-1.3.0和libtheora-1.1.1
编译libogg:
./configure --host=x86_64-w64-mingw32
make
编译libtheora:
./configure --disable-examples --without-vorbis --disable-oggtest \
--with-ogg-includes=../libogg-1.3.0/include \
--with-ogg-libraries=../libogg-1.3.0/src/.libs \
--host=x86_64-w64-mingw32
汇编的结果是:
libtool: link: x86_64-w64-mingw32-gcc -shared .libs/libtheoradec-1.dll.def .libs/apiwrapper.o .libs/bitpack.o .libs/decapiwrapper.o .libs/decinfo.o .libs/decode.o .libs/dequant.o .libs/fragment.o .libs/huffdec.o .libs/idct.o .libs/info.o .libs/internal.o .libs/quant.o .libs/state.o .libs/mmxidct.o .libs/mmxfrag.o .libs/mmxstate.o .libs/x86state.o -o .libs/libtheoradec-1.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libtheoradec.dll.a
/usr/bin/x86_64-w64-mingw32-ld: .libs/libtheoradec-1.dll.def:3: syntax error
/usr/bin/x86_64-w64-mingw32-ld:.libs/libtheoradec-1.dll.def: file format not recognized; treating as linker script
/usr/bin/x86_64-w64-mingw32-ld:.libs/libtheoradec-1.dll.def:2: syntax error
libtheoradec-1.dll.def的前几行:
EXPORTS
EXPORTS^M
; Old alpha API^M
theora_version_string @ 1^M
theora_version_number @ 2^M
答案 0 :(得分:0)
我建议您最好将libogg-1.3.0
安装在libogg_bin
./configure --host=x86_64-w64-mingw32 --prefix=(path to install)/libogg_bin
make
make install
当你安装文件权限并对编译代码进行一些其他更改
cd libtheora-1.1.1
./configure --disable-examples --without-vorbis --disable-oggtest --with-ogg-includes=/path to-installed/include --with-ogg-libraries=/path to-installed/lib --host=x86_64-w64-mingw32