windows - How can I run mingw-w64 linker under Eclipse under Ubuntu? -


i'm trying compile & link simple win32 console app eclipse under ubuntu 14.04(64bit), , run under wine. have installed mingw-w64 3.1.0-1. i've set eclipse 'cross settings', unsure how set 'mingw c++ linker' option; i'm suspicious it's running 'normal g++'. i've added extension of '.exe'. anyway, build output is:

building file: ../src/loaddlls.cpp invoking: gcc c++ compiler g++ -m32 -o0 -g3 -wall -c -fmessage-length=0 -mmd -mp -mf"src/loaddlls.d" -mt"src/loaddlls.o" -o "src/loaddlls.o" "../src/loaddlls.cpp" finished building: ../src/loaddlls.cpp  building target: loaddlls.exe invoking: mingw c++ linker g++ -m32 -o "loaddlls.exe"  ./src/loaddlls.o    finished building target: loaddlls.exe 

wine complains with

wine: bad exe format z:\home\[...]\debug\loaddlls.exe. 

nb wine running existing win32 apps fine

edit append '-v' output:

make  building file: ../src/loaddlls.cpp invoking: gcc c++ compiler g++ -m32 -o0 -g3 -wall -c -fmessage-length=0 -v -mmd -mp -mf"src/loaddlls.d" -mt"src/loaddlls.o" -o "src/loaddlls.o" "../src/loaddlls.cpp" using built-in specs. collect_gcc=g++ target: x86_64-linux-gnu configured with: ../src/configure -v --with-pkgversion='ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/readme.bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu thread model: posix gcc version 4.8.4 (ubuntu 4.8.4-2ubuntu1~14.04.3)  collect_gcc_options='-m32' '-o0' '-g3' '-wall' '-c' '-fmessage-length=0' '-v' '-mmd' '-mp' '-mf' 'src/loaddlls.d' '-mt' 'src/loaddlls.o' '-o' 'src/loaddlls.o' '-shared-libgcc' '-mtune=generic' '-march=i686'  /usr/lib/gcc/x86_64-linux-gnu/4.8/cc1plus -quiet -v -imultilib 32 -imultiarch i386-linux-gnu -mmd src/loaddlls.d -mf src/loaddlls.d -mp -mt src/loaddlls.o -dd -d_gnu_source ../src/loaddlls.cpp -quiet -dumpbase loaddlls.cpp -m32 -mtune=generic -march=i686 -auxbase-strip src/loaddlls.o -g3 -o0 -wall -version -fmessage-length=0 -fstack-protector -wformat-security -o /tmp/ccbarxna.s gnu c++ (ubuntu 4.8.4-2ubuntu1~14.04.3) version 4.8.4 (x86_64-linux-gnu)     compiled gnu c version 4.8.4, gmp version 5.1.3, mpfr version 3.1.2-p3, mpc version 1.0.1 ggc heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/usr/include/i386-linux-gnu/c++/4.8" ignoring nonexistent directory "/usr/local/include/i386-linux-gnu" ignoring nonexistent directory "/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../x86_64-linux-gnu/include" ignoring nonexistent directory "/usr/include/i386-linux-gnu" #include "..." search starts here: #include <...> search starts here:  /usr/include/c++/4.8  /usr/include/x86_64-linux-gnu/c++/4.8/32  /usr/include/c++/4.8/backward  /usr/lib/gcc/x86_64-linux-gnu/4.8/include  /usr/local/include  /usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed  /usr/include end of search list. gnu c++ (ubuntu 4.8.4-2ubuntu1~14.04.3) version 4.8.4 (x86_64-linux-gnu)     compiled gnu c version 4.8.4, gmp version 5.1.3, mpfr version 3.1.2-p3, mpc version 1.0.1 ggc heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 compiler executable checksum: 9ddcbef7de15d896f5df83657bc78822 collect_gcc_options='-m32' '-o0' '-g3' '-wall' '-c' '-fmessage-length=0' '-v' '-mmd' '-mp' '-mf' 'src/loaddlls.d' '-mt' 'src/loaddlls.o' '-o' 'src/loaddlls.o' '-shared-libgcc' '-mtune=generic' '-march=i686'  -v --32 -o src/loaddlls.o /tmp/ccbarxna.s gnu assembler version 2.24 (x86_64-linux-gnu) using bfd version (gnu binutils ubuntu) 2.24 compiler_path=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/ library_path=/usr/lib/gcc/x86_64-linux-gnu/4.8/32/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/ collect_gcc_options='-m32' '-o0' '-g3' '-wall' '-c' '-fmessage-length=0' '-v' '-mmd' '-mp' '-mf' 'src/loaddlls.d' '-mt' 'src/loaddlls.o' '-o' 'src/loaddlls.o' '-shared-libgcc' '-mtune=generic' '-march=i686' finished building: ../src/loaddlls.cpp  building target: loaddlls.exe invoking: mingw c++ linker g++ -m32 -v -o "loaddlls.exe"  ./src/loaddlls.o    using built-in specs. collect_gcc=g++ collect_lto_wrapper=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper target: x86_64-linux-gnu configured with: ../src/configure -v --with-pkgversion='ubuntu 4.8.4-2ubuntu1~14.04.3' --with-bugurl=file:///usr/share/doc/gcc-4.8/readme.bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu thread model: posix gcc version 4.8.4 (ubuntu 4.8.4-2ubuntu1~14.04.3)  compiler_path=/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/ library_path=/usr/lib/gcc/x86_64-linux-gnu/4.8/32/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/:/lib/i386-linux-gnu/:/lib/../lib32/:/usr/lib/i386-linux-gnu/:/usr/lib/../lib32/:/usr/lib/gcc/x86_64-linux-gnu/4.8/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../:/lib/i386-linux-gnu/:/lib/:/usr/lib/i386-linux-gnu/:/usr/lib/ collect_gcc_options='-m32' '-v' '-o' 'loaddlls.exe' '-shared-libgcc' '-mtune=generic' '-march=i686'  /usr/lib/gcc/x86_64-linux-gnu/4.8/collect2 --sysroot=/ --build-id --eh-frame-hdr -m elf_i386 --hash-style=gnu --as-needed -dynamic-linker /lib/ld-linux.so.2 -z relro -o loaddlls.exe /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/crt1.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/crti.o /usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtbegin.o -l/usr/lib/gcc/x86_64-linux-gnu/4.8/32 -l/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu -l/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32 -l/lib/i386-linux-gnu -l/lib/../lib32 -l/usr/lib/i386-linux-gnu -l/usr/lib/../lib32 -l/usr/lib/gcc/x86_64-linux-gnu/4.8 -l/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../i386-linux-gnu -l/usr/lib/gcc/x86_64-linux-gnu/4.8/../../.. -l/lib/i386-linux-gnu -l/usr/lib/i386-linux-gnu ./src/loaddlls.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-linux-gnu/4.8/32/crtend.o /usr/lib/gcc/x86_64-linux-gnu/4.8/../../../../lib32/crtn.o finished building target: loaddlls.exe 


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -