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

  FORUM HardWare.fr
  Programmation
  C++

  Multiple définition

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Multiple définition

n°1041168
vincent0
Posté le 09-04-2005 à 13:42:22  profilanswer
 

Bonjour,
 
Dans un fichier .h j'ai ceci:

Code :
  1. #ifndef WXRADAFFI_H
  2. #define WXRADAFFI_H
  3. #include <wx/wx.h>
  4. #include <map>
  5. std::map<wxString, int> list_sizer;
  6. #endif


 
J'ai plusieur fichier .cpp qui include le fichier .h ci-dessous et il ne touche pas à la variable list_sizer.
 
Lors du linkage voici une parti du message d'erreur, pourquoi ?:
obj/fen.o(.bss+0x48):fen.cpp: multiple definition of `list_sizer'
obj/proprietes.o(.bss+0x48):proprietes.cpp: first defined here
obj/aff_fen.o(.bss+0x43c):aff_fen.cpp: multiple definition of `list_sizer'
obj/proprietes.o(.bss+0x48):proprietes.cpp: first defined here
obj/button.o(.bss+0xf8):button.cpp: multiple definition of `list_sizer'
....
 
Merci d'avance...

mood
Publicité
Posté le 09-04-2005 à 13:42:22  profilanswer
 

n°1041189
Taz
bisounours-codeur
Posté le 09-04-2005 à 14:05:13  profilanswer
 

1) WXRADAFFI_H n'est pas assez unique, mais ce n'est pas là le problème
2) ici, tu fais à la fois la déclaration et la définition. rajoute un petit extern devant, et fais la définition/initialization dans un fichier .cpp

n°1041198
vincent0
Posté le 09-04-2005 à 14:14:31  profilanswer
 

1) Comment ça pas assez unique ? Tu veut dire qu'il pourrait se trouver déjà dans un autre fichier .h ?
2) Je voi bien que je fait une déclaration de list_sizer mais je voi pas de définition de list_sizer !
 
Merci, ça fonctionne mnt...

n°1041201
Taz
bisounours-codeur
Posté le 09-04-2005 à 14:17:09  profilanswer
 

1) ben non, surtout que WX c'est le prffix qu'utilise WX !
fous un truc genre _VINCENT0_NOM_PROJET_NOM_FICHIER_H_
 
2) et pourtant.

n°1041234
Lam's
Profil: bas.
Posté le 09-04-2005 à 14:44:19  profilanswer
 

Taz a écrit :

1) ben non, surtout que WX c'est le prffix qu'utilise WX !
fous un truc genre _VINCENT0_NOM_PROJET_NOM_FICHIER_H_


Pour être précis, c'est _WX. :)  
 
Et justement, c'est mal en théorie. Je cite le standard:

Citation :

17.4.3.1.2 Global names
 
  1 Certain sets of names and function signatures are always reserved
    to the implementation:
 
   - Each name that contains a double underscore (__) or begins with
     an underscore followed by an upper-case letter (2.11) is reserved
     to the implementation for any use.

   - Each name that begins with an underscore is reserved to the
     implementation for use as a name in the global namespace. 165)


 
La façon dont je comprend ça: ces symboles sont réservés pour ton compilo, ni pour toi, ni pour le standard C++.


Message édité par Lam's le 09-04-2005 à 14:44:49
n°1041426
Taz
bisounours-codeur
Posté le 09-04-2005 à 17:33:06  profilanswer
 

ah oui merde, c'est vrai. c'est juste pour pas mélanger vraies macros et include-gardes. T'as raison. faut donc en rejouter une couche /D

n°1109887
Luvesco
Posté le 06-06-2005 à 16:02:54  profilanswer
 


Bonjour,
 
Je suis en train de continuer une application en C++
J'ai les codes sources et tout , les logiciels de développement (Dev-cpp, wxWindow)
 
Le problème, c'est que j'ai des erreurs de Linking (aucune de compil):
 

Citation :

data.cpp  :??:  C:\Dev-Cpp\lib\libwxmsw.a(data.o)(.data$_ZTV12wxWindowList+0x0) multiple definition of `vtable for wxWindowList'
CFenetrePrincipale.cpp S:\Markov\markov\CFenetrePrincipale.o(.rdata$_ZTV12wxWindowList+0x0) first defined here  
 


 
voici l'entête de CFenêtrePrinc.cpp :
 

Citation :

#include "CFenetrePrincipale.h"
 
#include "icones/open.xpm"
#include "icones/new.xpm"
#include "icones/save.xpm"
#include "icones/cancel.xpm"
#include "icones/help.xpm"
#include "icones/mondrian.xpm"
 
#include "CControleur.h"
#include "CEtats.h"
 
#include <wx/wxhtml.h>
 
...


 
et celui de CFenetrePrinc.h :
 

Citation :

#include <wx/wx.h>
#include <wx/image.h>
 
#ifndef CFenetrePrincipale_H
#define CFenetrePrincipale_H
 
#include <wx/notebook.h>
#include <wx/statline.h>
 
#include<wx/grid.h>
#include<wx/spinctrl.h>
#include<wx/combobox.h>
 
//DEBUG
#include "CGrapheTransition.h"
//FINDEBUG
 


 
Ca ressemble à l'erreur de vincent0 mais je vois pas où elle est !! :fou:  
 
 
Merci d'avance ! :)  

n°1109931
Taz
bisounours-codeur
Posté le 06-06-2005 à 16:16:17  profilanswer
 

mais non ... il te faut une déclaration extern dans un .hpp et une définition dans un .cpp

n°1110033
Luvesco
Posté le 06-06-2005 à 17:05:30  profilanswer
 


Désolé, je débute en C++
 
l'extern, je le met devant quoi ?
je n'ai pas de wxWindowList dans mes fichiers.
 
en plus je retrouve l'erreur dans seulement 4 fichiers alors que j'ai 19 fichiers.
dans aucun des autres fichiers je n'ai d'extern et ils ne donnent pas d'erreur.
 
je sais vraiment plus quoi faire !!

n°1110037
Taz
bisounours-codeur
Posté le 06-06-2005 à 17:06:13  profilanswer
 

une recherche alors

mood
Publicité
Posté le 06-06-2005 à 17:06:13  profilanswer
 

n°1110734
Luvesco
Posté le 07-06-2005 à 11:21:24  profilanswer
 


est ce que ce serait pas un prob de bibliothèque au niveau des parametres du linker?
(libwxmsw.a)

n°1110772
Taz
bisounours-codeur
Posté le 07-06-2005 à 11:46:05  profilanswer
 

non

n°1119596
Luvesco
Posté le 14-06-2005 à 15:05:36  profilanswer
 


Bonjour,
 
je me suis dit de tout reprendre à 0  
voila ce que ca a donné :
 
Main.cpp :
 
 

Citation :

#include "wx/wxprec.h"
 
#ifdef __BORLANDC__
    #pragma hdrstop
#endif
 
 
#ifndef WX_PRECOMP
    #include "wx/wx.h"
#endif
 
 
 
#include "MyFrame1.h"
 
class MyApp : public wxApp
{
public:
   
    virtual bool OnInit();
};
 
IMPLEMENT_APP(MyApp)
 
bool MyApp:: OnInit()
{
     
    MyFrame1 *frame = new MyFrame1(NULL,-1,_T("Minimal wxWindows App" ),
                                 wxPoint(50, 50), wxSize(450, 340));
 
     
    frame->Show(TRUE);
 
   
    return TRUE;
}
 


 
MyFrame1.h :
 

Citation :

// -*- C++ -*- generated by wxGlade 0.3.3 on Tue Jun 22 10:08:31 2004
 
 
 
#ifndef MYFRAME1_H
#define MYFRAME1_H
 
 
#include <wx/wx.h>
#include <wx/image.h>
// begin wxGlade: dependencies
#include <wx/notebook.h>
#include <wx/statline.h>
// end wxGlade
 
 
class MyFrame1: public wxFrame {
public:
    // begin wxGlade: MyFrame1::ids
    // end wxGlade
 
    MyFrame1(wxWindow* parent, int id, const wxString& title, const wxPoint& pos =wxDefaultPosition, const  wxSize& size =wxDefaultSize ); //, long style =wxDEFAULT_FRAME_STYLE);
 
private:
    // begin wxGlade: MyFrame1::methods
    void set_properties();
    void do_layout();
    // end wxGlade
 
protected:
    // begin wxGlade: MyFrame1::attributes
    wxMenuBar* frame_2_menubar;
    wxStaticLine* static_line_13;
    wxPanel* panel_espace_haut;
    wxStaticLine* static_line_11;
    wxStaticText* label_nb_etat;
    wxTextCtrl* text_nb_etat;
    wxStaticLine* static_line_1;
    wxStaticText* label_modele;
    wxCheckBox* checkbox_modele;
    wxStaticLine* static_line_15;
    wxStaticText* label_iteration;
    wxTextCtrl* text_iteration;
    wxStaticLine* static_line_3;
    wxStaticText* label_matrice;
    wxStaticText* label_choix_matrice;
    wxComboBox* combo_box_choix_matrice;
    wxButton* button_test;
    wxStaticLine* static_line_4;
    wxStaticText* label_validation;
    wxButton* button_valider;
    wxButton* button_effacer;
    wxStaticLine* static_line_5;
    wxPanel* notebook_nouvelle_chaine_corps;
    wxStaticLine* static_line_14;
    wxPanel* notebook_graphe_transition;
    wxPanel* panel_2;
    wxStaticLine* static_line_12;
    wxStaticText* label_vect_init;
    wxStaticLine* static_line_8;
    wxStaticText* label_vect_iteration;
    wxStaticText* label_iteration_onglet3;
    wxTextCtrl* text_iteration_onglet3;
    wxButton* button_valider_iteration;
    wxStaticLine* static_line_9;
    wxStaticText* label_resultat;
    wxStaticLine* static_line_10;
    wxPanel* notebook_simulation;
    wxNotebook* notebook_1;
    // end wxGlade
};
 
 
#endif // MYFRAME1_H


 
 
MyFrame1.cpp :
 

Citation :

// -*- C++ -*- generated by wxGlade 0.3.3 on Tue Jun 22 10:08:31 2004
 
#include "MyFrame1.h"
 
 
MyFrame1::MyFrame1(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size/*, long style*/):
    wxFrame(parent, id, title, pos, size, wxDEFAULT_FRAME_STYLE)
{
    // begin wxGlade: MyFrame1::MyFrame1
    notebook_1 = new wxNotebook(this, -1, wxDefaultPosition, wxDefaultSize, 0);
    notebook_simulation = new wxPanel(notebook_1, -1);
    notebook_graphe_transition = new wxPanel(notebook_1, -1);
    notebook_nouvelle_chaine_corps = new wxPanel(notebook_1, -1);
    frame_2_menubar = new wxMenuBar();
    SetMenuBar(frame_2_menubar);
    wxMenu* wxglade_tmp_menu_1 = new wxMenu();
    wxglade_tmp_menu_1->Append(wxNewId(), wxT("nouveau" ), wxT("" ), wxITEM_NORMAL);
    frame_2_menubar->Append(wxglade_tmp_menu_1, wxT("menu" ));
    static_line_13 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    panel_espace_haut = new wxPanel(notebook_nouvelle_chaine_corps, -1);
    static_line_11 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    label_nb_etat = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("1/ Nombre d'etats :  " ));
    text_nb_etat = new wxTextCtrl(notebook_nouvelle_chaine_corps, -1, wxT("" ));
    static_line_1 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    label_modele = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("2/ Modele Homogene ?  " ));
    checkbox_modele = new wxCheckBox(notebook_nouvelle_chaine_corps, -1, wxT("OUI  " ));
    static_line_15 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    label_iteration = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("- Nombre d'iterations :   " ));
    text_iteration = new wxTextCtrl(notebook_nouvelle_chaine_corps, -1, wxT("" ));
    static_line_3 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    label_matrice = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("3/ Matrice de transition : " ));
    label_choix_matrice = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("choix de la matrice de transition :   " ));
    const wxString combo_box_choix_matrice_choices[] = {
         
    };
    combo_box_choix_matrice = new wxComboBox(notebook_nouvelle_chaine_corps, -1, wxT("" ), wxDefaultPosition, wxDefaultSize, 0, combo_box_choix_matrice_choices, wxCB_DROPDOWN);
    button_test = new wxButton(notebook_nouvelle_chaine_corps, -1, wxT("test agrandissement" ));
    static_line_4 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    label_validation = new wxStaticText(notebook_nouvelle_chaine_corps, -1, wxT("4/ Validation :" ));
    button_valider = new wxButton(notebook_nouvelle_chaine_corps, -1, wxT("Valider " ));
    button_effacer = new wxButton(notebook_nouvelle_chaine_corps, -1, wxT("Effacer" ));
    static_line_5 = new wxStaticLine(notebook_nouvelle_chaine_corps, -1);
    static_line_14 = new wxStaticLine(notebook_graphe_transition, -1);
    panel_2 = new wxPanel(notebook_simulation, -1);
    static_line_12 = new wxStaticLine(notebook_simulation, -1);
    label_vect_init = new wxStaticText(notebook_simulation, -1, wxT(" 1/ Saissisez le vecteur de probabilité initiale :" ));
    static_line_8 = new wxStaticLine(notebook_simulation, -1);
    label_vect_iteration = new wxStaticText(notebook_simulation, -1, wxT("2/ Pour quelle itération souhaitez-vous effectuer une simulation?" ));
    label_iteration_onglet3 = new wxStaticText(notebook_simulation, -1, wxT(" - Itération : " ));
    text_iteration_onglet3 = new wxTextCtrl(notebook_simulation, -1, wxT("" ));
    button_valider_iteration = new wxButton(notebook_simulation, -1, wxT("Valider" ));
    static_line_9 = new wxStaticLine(notebook_simulation, -1);
    label_resultat = new wxStaticText(notebook_simulation, -1, wxT("3/ résultat :" ));
    static_line_10 = new wxStaticLine(notebook_simulation, -1);
 
    set_properties();
    do_layout();
    // end wxGlade
}
 
 
void MyFrame1::set_properties()
{
    // begin wxGlade: MyFrame1::set_properties
    SetTitle(wxT("frame_2" ));
    text_nb_etat->SetFont(wxFont(14, wxDEFAULT, wxNORMAL, wxNORMAL, 0, "" ));
    checkbox_modele->SetValue(1);
    combo_box_choix_matrice->SetSelection(-1);
    // end wxGlade
}
 
 
void MyFrame1::do_layout()
{
    // begin wxGlade: MyFrame1::do_layout
    wxBoxSizer* sizer_premier = new wxBoxSizer(wxVERTICAL);
    wxBoxSizer* sizer_onglet3 = new wxBoxSizer(wxVERTICAL);
    wxStaticBoxSizer* sizer_23 = new wxStaticBoxSizer(new wxStaticBox(notebook_simulation, -1, wxT("" )), wxHORIZONTAL);
    wxBoxSizer* sizer_onglet3_q3 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet3_q2_iteration = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet3_q2 = new wxBoxSizer(wxHORIZONTAL);
    wxStaticBoxSizer* sizer_22 = new wxStaticBoxSizer(new wxStaticBox(notebook_simulation, -1, wxT("" )), wxHORIZONTAL);
    wxBoxSizer* sizer_onglet3_q1 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_espace_onglet3 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet2 = new wxBoxSizer(wxVERTICAL);
    wxStaticBoxSizer* sizer_28 = new wxStaticBoxSizer(new wxStaticBox(notebook_graphe_transition, -1, wxT("" )), wxHORIZONTAL);
    wxBoxSizer* sizer_onglet1 = new wxBoxSizer(wxVERTICAL);
    wxBoxSizer* sizer_onglet1_q4_bouton = new wxBoxSizer(wxHORIZONTAL);
    wxStaticBoxSizer* atiosizer_bouton = new wxStaticBoxSizer(new wxStaticBox(notebook_nouvelle_chaine_corps, -1, wxT("" )), wxHORIZONTAL);
    wxBoxSizer* sizer_onglet1_q4 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_test_agrandi = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet1_q3 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_27 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet1_q2 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_onglet1_q1 = new wxBoxSizer(wxHORIZONTAL);
    wxBoxSizer* sizer_espace_onglet1 = new wxBoxSizer(wxHORIZONTAL);
    sizer_onglet1->Add(static_line_13, 0, wxEXPAND, 0);
    sizer_espace_onglet1->Add(panel_espace_haut, 1, wxEXPAND, 0);
    sizer_onglet1->Add(sizer_espace_onglet1, 0, wxALL|wxEXPAND, 5);
    sizer_onglet1->Add(static_line_11, 0, wxEXPAND, 0);
    sizer_onglet1_q1->Add(label_nb_etat, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet1_q1->Add(text_nb_etat, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxSHAPED, 2);
    sizer_onglet1->Add(sizer_onglet1_q1, 0, wxALL|wxEXPAND, 5);
    sizer_onglet1->Add(static_line_1, 0, wxEXPAND, 0);
    sizer_onglet1_q2->Add(label_modele, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet1_q2->Add(checkbox_modele, 1, wxALIGN_CENTER_VERTICAL, 0);
    sizer_onglet1->Add(sizer_onglet1_q2, 0, wxALL|wxEXPAND, 5);
    sizer_onglet1->Add(static_line_15, 0, wxEXPAND, 0);
    sizer_27->Add(100, 20, 0, 0, 0);
    sizer_27->Add(label_iteration, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 3);
    sizer_27->Add(text_iteration, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxSHAPED, 3);
    sizer_onglet1->Add(sizer_27, 0, wxEXPAND, 0);
    sizer_onglet1->Add(static_line_3, 0, wxEXPAND, 0);
    sizer_onglet1_q3->Add(label_matrice, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet1_q3->Add(20, 20, 1, 0, 0);
    sizer_onglet1_q3->Add(label_choix_matrice, 0, wxALIGN_CENTER_VERTICAL, 0);
    sizer_onglet1_q3->Add(combo_box_choix_matrice, 0, 0, 0);
    sizer_onglet1->Add(sizer_onglet1_q3, 0, wxALL|wxEXPAND, 5);
    sizer_test_agrandi->Add(button_test, 1, wxEXPAND, 0);
    sizer_onglet1->Add(sizer_test_agrandi, 1, wxEXPAND, 0);
    sizer_onglet1->Add(static_line_4, 0, wxEXPAND, 0);
    sizer_onglet1_q4->Add(label_validation, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet1->Add(sizer_onglet1_q4, 0, wxEXPAND, 0);
    sizer_onglet1_q4_bouton->Add(20, 20, 1, 0, 0);
    atiosizer_bouton->Add(button_valider, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 20);
    atiosizer_bouton->Add(30, 40, 0, 0, 0);
    atiosizer_bouton->Add(button_effacer, 0, wxRIGHT|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 20);
    sizer_onglet1_q4_bouton->Add(atiosizer_bouton, 0, wxALL|wxEXPAND, 10);
    sizer_onglet1_q4_bouton->Add(20, 20, 1, 0, 0);
    sizer_onglet1->Add(sizer_onglet1_q4_bouton, 0, wxEXPAND, 0);
    sizer_onglet1->Add(static_line_5, 0, wxEXPAND, 0);
    notebook_nouvelle_chaine_corps->SetAutoLayout(true);
    notebook_nouvelle_chaine_corps->SetSizer(sizer_onglet1);
    sizer_onglet1->Fit(notebook_nouvelle_chaine_corps);
    sizer_onglet1->SetSizeHints(notebook_nouvelle_chaine_corps);
    sizer_onglet2->Add(static_line_14, 0, wxEXPAND, 0);
    sizer_onglet2->Add(sizer_28, 1, wxALL|wxEXPAND, 40);
    notebook_graphe_transition->SetAutoLayout(true);
    notebook_graphe_transition->SetSizer(sizer_onglet2);
    sizer_onglet2->Fit(notebook_graphe_transition);
    sizer_onglet2->SetSizeHints(notebook_graphe_transition);
    sizer_espace_onglet3->Add(panel_2, 1, wxEXPAND, 0);
    sizer_onglet3->Add(sizer_espace_onglet3, 0, wxALL|wxEXPAND, 5);
    sizer_onglet3->Add(static_line_12, 0, wxEXPAND, 0);
    sizer_onglet3_q1->Add(label_vect_init, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet3->Add(sizer_onglet3_q1, 0, wxALL|wxEXPAND, 5);
    sizer_onglet3->Add(sizer_22, 1, wxALL|wxEXPAND, 10);
    sizer_onglet3->Add(static_line_8, 0, wxEXPAND, 0);
    sizer_onglet3_q2->Add(label_vect_iteration, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet3->Add(sizer_onglet3_q2, 0, wxALL|wxEXPAND, 5);
    sizer_onglet3_q2_iteration->Add(90, 20, 0, 0, 0);
    sizer_onglet3_q2_iteration->Add(label_iteration_onglet3, 0, wxALIGN_CENTER_VERTICAL, 0);
    sizer_onglet3_q2_iteration->Add(text_iteration_onglet3, 0, wxALIGN_CENTER_VERTICAL|wxSHAPED, 0);
    sizer_onglet3_q2_iteration->Add(20, 20, 0, 0, 0);
    sizer_onglet3_q2_iteration->Add(button_valider_iteration, 0, wxALL, 5);
    sizer_onglet3->Add(sizer_onglet3_q2_iteration, 0, wxEXPAND, 0);
    sizer_onglet3->Add(static_line_9, 0, wxEXPAND, 0);
    sizer_onglet3_q3->Add(label_resultat, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5);
    sizer_onglet3->Add(sizer_onglet3_q3, 0, wxALL|wxEXPAND, 5);
    sizer_onglet3->Add(sizer_23, 1, wxALL|wxEXPAND, 10);
    sizer_onglet3->Add(static_line_10, 0, wxEXPAND, 0);
    notebook_simulation->SetAutoLayout(true);
    notebook_simulation->SetSizer(sizer_onglet3);
    sizer_onglet3->Fit(notebook_simulation);
    sizer_onglet3->SetSizeHints(notebook_simulation);
    notebook_1->AddPage(notebook_nouvelle_chaine_corps, wxT("Nouvelle chaine" ));
    notebook_1->AddPage(notebook_graphe_transition, wxT("Graphe de transition" ));
    notebook_1->AddPage(notebook_simulation, wxT("Simulation" ));
    sizer_premier->Add(new wxNotebookSizer(notebook_1), 1, wxEXPAND, 0);
    SetAutoLayout(true);
    SetSizer(sizer_premier);
    sizer_premier->Fit(this);
    sizer_premier->SetSizeHints(this);
    Layout();
    // end wxGlade
}


 
 
Je pensais que ça marcherait mais :
 

Citation :


data.cpp       C:\Dev-Cpp\lib\libwxmsw.a(data.o)(.data$_ZTV12wxWindowList+0x0)     multiple definition of `vtable for wxWindowList'  
MyFrame1.cpp   S:\essai\Logiciel_REPERES\TestwxWindows\home\depardieu\Documents\MyFrame1.o(.rdata$_ZTV12wxWindowList+0x0)    first defined here
 
mdi.cpp C:\Dev-Cpp\lib\libwxmsw.a(mdi.o)(.data$_ZTV14wxMenuItemList+0x0) multiple definition of `vtable for wxMenuItemList'  
MyFrame1.cpp S:\essai\Logiciel_REPERES\TestwxWindows\home\depardieu\Documents\MyFrame1.o(.rdata$_ZTV14wxMenuItemList+0x0) first defined here  
 


 
exactement la meme erreur qu'avt .
La le fichier était plus petit alors je pensais trouver l'erreur, mais non ... :fou:  
 
 
Si tu pouvais me dire ou mettre le extern, je te ferais une statue !!! :love:  
 
merci

n°1119605
Taz
bisounours-codeur
Posté le 14-06-2005 à 15:08:32  profilanswer
 

dommage

n°1120679
Luvesco
Posté le 15-06-2005 à 12:46:39  profilanswer
 


Ca y est, ca marche !!!  :)  
Ca n'avait rien a voir avec "extern"  :kaola:  
A priori, ce serait un probleme de la version 4.9.9.0 que j'utilisais !
Ou bien un probleme entre devCpp et wxGlade.
 
maintenant avec la 4.9.9.2 tout fonctionne !
 
 :hello:  

n°1120686
Taz
bisounours-codeur
Posté le 15-06-2005 à 12:51:02  profilanswer
 

ben ton problème initiale a avoir avec extern. Seulement là c'est pas le même problème. Mais tant que tu décideras pas d'apprendre un peu le C++, t'en seras réduit à cuisiner 'et si je rajoute ce mot-magique est-ce que ça marche' ...


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C++

  Multiple définition

 

Sujets relatifs
CSS : définition des Liens... oui mais..[Perl] sort et tri multiple !
[php]recuperation des elements d'une liste multiplemultiple definition
définition que je trouve nul part "evenement baroc"définition de rand()
ComboBox à choix multiplelancement de programme multiple
Problème syntaxique de définition de template pour une fonction membre[C] Erreur 'multiple definition' à la compiliation !!?
Plus de sujets relatifs à : Multiple définition


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