IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Eclipse C & C++ Discussion :

compilation prog avec wxwidget sous eclipse


Sujet :

Eclipse C & C++

  1. #1
    Membre éclairé Avatar de grabriel
    Inscrit en
    Septembre 2006
    Messages
    946
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 946
    Points : 730
    Points
    730
    Par défaut compilation prog avec wxwidget sous eclipse
    Bonjour,

    Je sais un message portant sur le meme sujet un peu plus bas.

    J'ai eclipse
    j'ai wxWidget d'installé

    J'ai rajouté les lignes du post précédent comme expliqué mais j'ai ce message d'erreur :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
     
    **** Build of configuration Debug for project MyProject ****
     
    **** Internal Builder is used for build               ****
    g++ `wx-config --cxxflags` -IC:/wxWidgets-2.8.7/include -O0 -g3 -Wall -c -fmessage-length=0 -osrc\MyApp.o ..\src\MyApp.cpp
    cc1plus.exe: error: unrecognized command line option "-fcxxflags`"
    g++: `wx-config: No such file or directory
    Build error occurred, build is stopped
    Time consumed: 94  ms.
    Est-ce que j'ai oublié de configurer quelque chose?

    Merci

  2. #2
    Membre éclairé
    Avatar de mamelouk
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    867
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Mai 2005
    Messages : 867
    Points : 810
    Points
    810
    Par défaut
    salut,

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    wx-config: No such file or directory
    est ce que wxconfig est dans ton path ? eclipse utilise des makefile donc toutes les erreurs que tu pourra avoir son résolvables comme si tu bossais en ligne de commande

    Débugger du code est deux fois plus dur que d'en écrire.
    Donc, si vous écrivez votre code aussi intelligemment que vous le pouvez, vous n'etes, par définition, pas assez intelligent pour le débugger.

  3. #3
    Membre éclairé Avatar de grabriel
    Inscrit en
    Septembre 2006
    Messages
    946
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 946
    Points : 730
    Points
    730
    Par défaut
    est ce que wxconfig est dans ton path ?
    Oui j'ai compilé wxconfig dans un répertoire c:\wx-widgetxxx\build-static-debug
    avec les parmètres suivant :
    ./configure --enable-debug --disable-shared --enable-unicode

    et mon path il pointe sur le répertoire c:\wx-widgetxxx\build-static-debug
    dans le lequel j'ai bien un fichier wx-config
    est-ce qu'il faut rajouter d'atres variables??
    le chemin est-il bon??

    ------------Edit---------------------

    Je suis passé en ligne de commande en donnant le chemin complet vers wx-config

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    D:\prog\MyApp>g++ C:/wxWidgets-2.8.7/build-static-debug/wx-config --cxxfl
    ags -IC:/wxWidgets-2.8.7/include -O0 -g3 -Wall -c -fmessage-length=0 -osrc\MyApp.o src\MyApp.cpp
    Ca me renvoie ca :

    g++: C:/wxWidgets-2.8.7/build-static-debug/wx-config: linker input file unused b
    ecause linking not done
    cc1plus.exe: error: unrecognized command line option "-fcxxflags"

    Je continue à chercher.....

  4. #4
    Membre éclairé
    Avatar de mamelouk
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    867
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Mai 2005
    Messages : 867
    Points : 810
    Points
    810
    Par défaut
    tu peut regarder ce que te renvoie C:/wxWidgets-2.8.7/build-static-debug/wx-config pour t'aider...

    aussi, je crois qu'il faut mettre des antiquotes autour de ca si tu veut qu'il le remplace par sa valeur (en tout cas c'est comme ca sous linux)

    Débugger du code est deux fois plus dur que d'en écrire.
    Donc, si vous écrivez votre code aussi intelligemment que vous le pouvez, vous n'etes, par définition, pas assez intelligent pour le débugger.

  5. #5
    Membre éclairé Avatar de grabriel
    Inscrit en
    Septembre 2006
    Messages
    946
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 946
    Points : 730
    Points
    730
    Par défaut
    Il ne reconnait pas la commande j'avais essayé avec msys il me renvoyait bien un résultat....

    Sinon je suis sous windows XP

    Y'a peut etre une manip à faire??? renommer le fichier en .exe pour que wiwi le reconnaisse en tant qu'executable??

  6. #6
    Membre éclairé
    Avatar de mamelouk
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    867
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Mai 2005
    Messages : 867
    Points : 810
    Points
    810
    Par défaut
    désolé je peut pas t'aider j'y connais rien en wxwidget.

    le mieux serait que tu puisse compiler ton programme en ligne de commande (en demandant de l'aide sur le forum wxwidget au pire des cas), ensuite je pourrais te filer un coup de main pour configurer eclipse.

    Débugger du code est deux fois plus dur que d'en écrire.
    Donc, si vous écrivez votre code aussi intelligemment que vous le pouvez, vous n'etes, par définition, pas assez intelligent pour le débugger.

  7. #7
    Membre éclairé Avatar de grabriel
    Inscrit en
    Septembre 2006
    Messages
    946
    Détails du profil
    Informations forums :
    Inscription : Septembre 2006
    Messages : 946
    Points : 730
    Points
    730
    Par défaut
    Ok merci pour ta proposition,

    je vais de suite poster sur le forum wxWidgets.


    ----Edit--------------

    J'ai trouvé un tuto pour netbeans, peut etre tu peux m'orienter pour l'adapter à éclipse, je comprends pas trop ou faut mettre les paramètres... j'ai essayé de copier tous les répertoires comme il dit, mais il me manque des paramètre je sais pas trop ou les mettres, c'est un peu chaud. Si y'a une procédure plus simple....

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    Installing Netbeans with wxWidgets
     
    Install Netbeans
    1.Make sure you have the Java Development Kit, if not, download and install the JDK from Sun's website (Uninstall any versions of the Java Runtime Evironment, as a JRE is included in the JDK. )
     
    2.Download MinGW, Msys, and the GNU DeBugger package from http://mingw.org
     
    3.Install MinGW, then install Msys. USE THE DEFAULT SETTINGS!
     
    4.At the end of the Msys installer, it asks to configure it with MinGW. Select yes. The installation folder for MinGW should be c:\MinGW
     
    5.Extract the GDB archive, and copy gdb.exe from the bin folder to C:\MinGW\bin
     
    6.Download and install Netbeans.
     
    7.Add  C:\MinGW\bin and C:\msys\1.0\bin (The bin directories for MinGW and Msys) to the PATH System variable, under  System Properties (My Computer->Right-click->Properties)  -> Advanced, the Evironment Variables button. Separate the directories using a semicolon (;)
     
    Install and compile wxWidgets
    1.Download the msi installer for wxWidgets from http://wxWidgets.org
     
    2.Install wxWidgets using default settings.
     
    3.Open the Msys console. (If it isn't installed with a shortcut on the desktop, it is in the Start Menu under Programs ->MinGW->MSYS->msys.exe. )
     
    4.Navigate to the wxWidgets folder (usually wxWidgets-x.x.x (with x.x.x Being the version number)) by typing cd /wxWidgets* (The asterisk lets you skip the version numbers).
     
    5.Create a new folder by typing mkdir [folder name]. For example, I used the folder name build-static-debug. (So I typed mkdir build-static-debug).
     
    6.Navigate to the new folder by typing cd ./[folder name]. I typed cd ./build-static-debug.
     
    7.Configure wxWidgets by using the configure script in the folder below by typing 
    ../configure. I recommend using the following configuration: debug, shared-disabled and unicode enabled. You can configure this configuration by typing 
    ../configure --enable-debug --disable-shared --enable-unicode
     
    8.Compile using the make command: make
     
    9.When make is finished run make install: make install
     
    10.Type rm *.o to remove unneeded files
     
     
    Set up a Netbeans Project with wxWidgets
    1.Open Netbeans.
     
    2.If you are creating a new project, select C/C++ Application, under the C/C++ catagory, name the project whatever you like, and leave all the other options at their defaults. Press Finish.
     
    3.Under the Projects pane, select your project. Right-click, and go to Properties under the menu that pops up.
     
    4.Go back to Msys. Navigate to your compiled wxWidgets folder.
    For me: cd /c/wxWidgets*/build-static-debug/
     
    5.Type the wx-config command, with the cxxflags flag.
    wx-config --cxxflags
     
    6.In the Project Properties dialog in Netbeans, under C/C++ -> C++ Compiler -> General, enter in the paths that have -I preceeding them (e.g. -I/c/wxWidgets-2.8.7/build-static-debug/lib/wx/include/msw-unicode-debug-static-2.8), by clicking the elipsis (...) button by Include Directories. Navigate to that directory (/c/ is the same as C:\) click on that folder, and click select. Repeat until all the listed directories are entered into Netbeans. Then click OK in the Include Directories dialog. Keep the msys window open.
     
    7.Go to Command Line, under C++ Compiler, and copy the additional output on the msys window by selecting the remaining flags, and pressing Ctrl+C. Go into the Additional Options dialog by pressing the elipsis (...) button next to Additional Options (under C/C++ -> C++ Compiler -> Command Line). In the text box, paste the flags by pressing Ctrl+V.
     
    8.Repeat the process from step 22, with the libs flag.
    wx-config --libs
     
    9.Copy the output from msys to Addional Options -> Linker -> Librarys, by selecting the elipsis (...), selecting Add Option, selecting Other Option, and Pasting the flags.
     
    10.Close msys and the Project Properties windows, and you're done.
     
    The project configuration steps also apply to Linux.

  8. #8
    Membre éclairé
    Avatar de mamelouk
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    867
    Détails du profil
    Informations personnelles :
    Localisation : France, Rhône (Rhône Alpes)

    Informations forums :
    Inscription : Mai 2005
    Messages : 867
    Points : 810
    Points
    810
    Par défaut
    "où se trouvent les options de compilation" et autres problèmes de compilation, c'est récurrent comme questions sur le forum, alors je vais écrire un post là dessus ce soir

    en attendant fouille dans les propriétés (clic droit sur projet), et franchement je te conseille de tout gérer toi meme (avec un makefile ou autre - cmake, scons...)

    Débugger du code est deux fois plus dur que d'en écrire.
    Donc, si vous écrivez votre code aussi intelligemment que vous le pouvez, vous n'etes, par définition, pas assez intelligent pour le débugger.

Discussions similaires

  1. Erreur de compilation avec GWT sous eclipse
    Par RAKIA dans le forum GWT et Vaadin
    Réponses: 7
    Dernier message: 23/08/2010, 18h55
  2. Compiler wxwidgets sous eclipse c++
    Par natoine dans le forum Eclipse C & C++
    Réponses: 18
    Dernier message: 05/02/2008, 14h01
  3. Connexion à une base de donnée avec swing sous eclipse
    Par kodo dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 07/04/2006, 11h03
  4. [VSS] Est ce possible de travailler avec VSS sous eclipse ?
    Par jlassira dans le forum Eclipse Java
    Réponses: 3
    Dernier message: 07/03/2006, 17h53
  5. Problèmes avec Hibernate (sous Eclipse)
    Par Pierric dans le forum Hibernate
    Réponses: 2
    Dernier message: 07/04/2005, 14h35

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo