Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2360 connectés 

  FORUM HardWare.fr
  Linux et OS Alternatifs
  Codes et scripts

  Crosscompil sous linux pour w32 avec mingw

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Crosscompil sous linux pour w32 avec mingw

n°1113607
XaTriX
Posté le 16-02-2009 à 23:40:58  profilanswer
 

Bonsoir à tous,
 
J'essaye de compiler pour Windows à partir de ma Débian Etch.
J'ai de dispo : gcc/g++/minw32 (i586-mingw32msvc-gcc/i586-mingw32msvc-g++/i586-mingw32msvc-windres) et binutils fraichement compilé/installé.
 
J'ai testé plusieures options dans le configure avec CC=i586-mingw32msvc-gcc / CXX=i586-mingw32msvc-g++ / --windres=i586-mingw32msvc-windres / --os=mingw
 
Alors au début j'ai eu des problèmes avec endian_check et strgen qui ont du mal être compilé à cause de i586-mingw32msvc-g++, quand je laisse g++ ça se passe bien de ce côté, pour ma dernire tentative la plus avancée j'ai utilisé :

./configure --windres=i586-mingw32msvc-windres --os=mingw
checking awk... awk
forcing OS... MINGW
checking build system type... x86_64-linux-gnu
checking host system type... x86_64-linux-gnu
checking universal build... no
checking build cc... gcc
checking host cc... gcc
checking build c++... g++
checking host c++... g++
checking host windres... i586-mingw32msvc-windres
checking host strip... strip
using CFLAGS... -O2 -fomit-frame-pointer  -DMINGW -Wall -Wno-multichar -Wsign-compare -Wundef -Wwrite-strings -Wpointer-arith -Wno-uninitialized -W -Wno-unused-parameter -Wno-unused-variable -mno-cygwin -fno-strict-aliasing -DWIN -DWITH_ZLIB -DUNICODE -D_UNICODE -DENABLE_NETWORK -DNDEBUG -DWITH_PERSONAL_DIR -DPERSONAL_DIR=\\"OpenTTD\\" -DGLOBAL_DATA_DIR=\\"/usr/local/share/games/openttd\\"  -Wstrict-prototypes -Wdeclaration-after-statement -Wold-style-definition
using LDFLAGS... -lstdc++ -lws2_32 -lwinmm -lgdi32 -ldxguid -lole32 /usr/lib/libz.a  -mno-cygwin -Wl,--subsystem,windows -static


 
Mais à la compilation :

# make
make[1]: entrant dans le répertoire « /home/openttd/src/0.6.3/objs/lang »
[LANG] Compiling and Linking endian_check.exe
[LANG] Testing endianness for host
[LANG] Compiling core/alloc_func.cpp
[LANG] Compiling string.cpp
[LANG] Compiling strgen/strgen.cpp
[LANG] Compiling and Linking strgen.exe
[LANG] Generating table/strings.h
[LANG] Compiling language afrikaans
[..............]
[LANG] Compiling language ukrainian
make[1]: quittant le répertoire « /home/openttd/src/0.6.3/objs/lang »
make[1]: entrant dans le répertoire « /home/openttd/src/0.6.3/objs/release »
[SRC] Compiling and Linking endian_check.exe
[SRC] Testing endianness for target
[SRC] DEP /home/openttd/src/0.6.3/src/ottdres.rc
[SRC] DEP yapf/yapf_ship.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP yapf/yapf_road.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP yapf/yapf_rail.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP window.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP win32.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP widgets/dropdown.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP widget.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP waypoint.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP water_cmd.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP viewport.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP video/win32_v.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP video/null_v.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP video/dedicated_v.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP vehicle_gui.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP vehicle.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP unmovable_cmd.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP tunnel_map.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP tunnelbridge_cmd.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP tree_cmd.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP transparency_gui.cpp
cc1plus: error: unrecognized command line option "-mno-cygwin"
[SRC] DEP train_gui.cpp
make: *** [all] Interruption


 
Je vois plus la, help [:ocube]
 
XaT


---------------
"Xat le punk à chien facho raciste. C'est complexe comme personnage." caudacien 05/10/2020
mood
Publicité
Posté le 16-02-2009 à 23:40:58  profilanswer
 

n°1113622
404 Not Fo​und
Posté le 17-02-2009 à 01:45:32  profilanswer
 

Faut dire ce que tu compiles aussi :o
 
A priori, le ./configure sans i586-mingw32msvc-g++ génère un Makefile qui va compiler tout ce qui est c++ avec le g++ "non-mingw", qui ne reconnait pas l'option "-mno-cygwin"
[:spamafoote]

n°1113980
XaTriX
Posté le 17-02-2009 à 16:45:18  profilanswer
 

Mais quand je fais avec le g++ de mingw32 il bugue sur la création de endian_check et strgen.. Et ça plante la dessus à la compilation vu que c'est mal compilé (faut que ça soit compilé pour linux (endian&strgen) mais qu'apres ça compile avec le g++ de mingw32, bref c'est l'anarchie :o
 
XaT


---------------
"Xat le punk à chien facho raciste. C'est complexe comme personnage." caudacien 05/10/2020

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Linux et OS Alternatifs
  Codes et scripts

  Crosscompil sous linux pour w32 avec mingw

 

Sujets relatifs
Booter Linux sur une ExpressCardAjout d'un deuxieme dd pour Linux
Choix distrib Linux: FEDORA ou UBUNTU[Conseil] Distribution Linux
[Mandriva 2009.0] Problème avec compiz-fusion et Firefox 3.05nagios 2.6/linux suze 8 entreprise
Testeur de perf de config sous Linux ?probleme drivers carte graphique sous linux
Créer un serveur Linux pour sauvegardeCommande linux
Plus de sujets relatifs à : Crosscompil sous linux pour w32 avec mingw


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR