Bonjour,

J'utilise :
- eclipse CDT 3.2
- Le compilateur MingW 3.4.5
- wxwidgets 2.8.7

J'ai récupéré le tuto Hello World pour test et j'ai des erreurs à la compilation :
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
 
**** Build of configuration Debug for project HW ****
 
**** Internal Builder is used for build               ****
g++ -IC:/wxWidgets-2.8.7/include -O0 -g3 -Wall -c -fmessage-length=0 -ohelloWorld.o ..\helloWorld.cpp
In file included from C:/wxWidgets-2.8.7/include/wx/defs.h:21,
                 from C:/wxWidgets-2.8.7/include/wx/wx.h:15,
                 from ..\helloWorld.cpp:6:
C:/wxWidgets-2.8.7/include/wx/platform.h:196:22: wx/setup.h: No such file or directory
In file included from C:/wxWidgets-2.8.7/include/wx/platform.h:279,
                 from C:/wxWidgets-2.8.7/include/wx/defs.h:21,
                 from C:/wxWidgets-2.8.7/include/wx/wx.h:15,
                 from ..\helloWorld.cpp:6:
C:/wxWidgets-2.8.7/include/wx/chkconf.h:103:9: #error "wxUSE_DYNLIB_CLASS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:111:9: #error "wxUSE_EXCEPTIONS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:119:9: #error "wxUSE_FILESYSTEM must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:127:9: #error "wxUSE_FS_ARCHIVE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:140:9: #error "wxUSE_DYNAMIC_LOADER must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:148:9: #error "wxUSE_LOG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:156:9: #error "wxUSE_LONGLONG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:164:9: #error "wxUSE_MIMETYPE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:180:9: #error "wxUSE_PRINTF_POS_PARAMS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:188:9: #error "wxUSE_PROTOCOL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:230:9: #error "wxUSE_REGEX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:238:9: #error "wxUSE_STDPATHS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:246:9: #error "wxUSE_XML must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:254:9: #error "wxUSE_SOCKETS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:262:9: #error "wxUSE_STREAMS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:270:9: #error "wxUSE_STOPWATCH must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:278:9: #error "wxUSE_TEXTBUFFER must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:286:9: #error "wxUSE_TEXTFILE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:302:9: #error "wxUSE_URL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:310:9: #error "wxUSE_VARIANT must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:330:9: #error "wxUSE_ABOUTDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:338:9: #error "wxUSE_ACCEL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:346:9: #error "wxUSE_ANIMATIONCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:354:9: #error "wxUSE_BITMAPCOMBOBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:362:9: #error "wxUSE_BMPBUTTON must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:370:9: #error "wxUSE_BUTTON must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:378:9: #error "wxUSE_CALENDARCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:386:9: #error "wxUSE_CARET must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:394:9: #error "wxUSE_CHECKBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:410:9: #error "wxUSE_CHOICE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:418:9: #error "wxUSE_CHOICEBOOK must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:426:9: #error "wxUSE_CHOICEDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:434:9: #error "wxUSE_CLIPBOARD must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:442:9: #error "wxUSE_COLLPANE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:450:9: #error "wxUSE_COLOURDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:458:9: #error "wxUSE_COLOURPICKERCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:466:9: #error "wxUSE_COMBOBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:474:9: #error "wxUSE_COMBOCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:482:9: #error "wxUSE_DATAOBJ must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:490:9: #error "wxUSE_DATAVIEWCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:498:9: #error "wxUSE_DATEPICKCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:506:9: #error "wxUSE_DIRPICKERCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:514:9: #error "wxUSE_DISPLAY must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:522:9: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:530:9: #error "wxUSE_FILEDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:538:9: #error "wxUSE_FILEPICKERCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:546:9: #error "wxUSE_FONTDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:554:9: #error "wxUSE_FONTMAP must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:562:9: #error "wxUSE_FONTPICKERCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:570:9: #error "wxUSE_GAUGE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:578:9: #error "wxUSE_GRAPHICS_CONTEXT must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:587:9: #error "wxUSE_GRID must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:595:9: #error "wxUSE_HELP must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:603:9: #error "wxUSE_HYPERLINKCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:611:9: #error "wxUSE_HTML must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:632:9: #error "wxUSE_ICO_CUR must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:640:9: #error "wxUSE_IFF must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:648:9: #error "wxUSE_IMAGLIST must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:656:9: #error "wxUSE_JOYSTICK must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:664:9: #error "wxUSE_LISTBOOK must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:672:9: #error "wxUSE_LISTBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:680:9: #error "wxUSE_LISTCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:688:9: #error "wxUSE_LOGGUI must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:696:9: #error "wxUSE_LOGWINDOW must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:704:9: #error "wxUSE_LOG_DIALOG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:712:9: #error "wxUSE_MDI must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:720:9: #error "wxUSE_MDI_ARCHITECTURE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:728:9: #error "wxUSE_MENUS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:736:9: #error "wxUSE_MSGDLG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:744:9: #error "wxUSE_NOTEBOOK must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:752:9: #error "wxUSE_ODCOMBOBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:760:9: #error "wxUSE_PALETTE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:768:9: #error "wxUSE_POPUPWIN must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:776:9: #error "wxUSE_PRINTING_ARCHITECTURE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:784:9: #error "wxUSE_RADIOBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:792:9: #error "wxUSE_RADIOBTN must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:800:9: #error "wxUSE_SASH must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:808:9: #error "wxUSE_SCROLLBAR must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:816:9: #error "wxUSE_SLIDER must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:824:9: #error "wxUSE_SOUND must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:832:9: #error "wxUSE_SPINBTN must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:840:9: #error "wxUSE_SPINCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:848:9: #error "wxUSE_SPLASH must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:856:9: #error "wxUSE_SPLITTER must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:864:9: #error "wxUSE_STATBMP must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:872:9: #error "wxUSE_STATBOX must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:880:9: #error "wxUSE_STATLINE must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:888:9: #error "wxUSE_STATTEXT must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:896:9: #error "wxUSE_STATUSBAR must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:904:9: #error "wxUSE_TAB_DIALOG must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:912:9: #error "wxUSE_TEXTCTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:920:9: #error "wxUSE_TIPWINDOW must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:928:9: #error "wxUSE_TOOLBAR must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:936:9: #error "wxUSE_TOOLTIPS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:944:9: #error "wxUSE_TREECTRL must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:952:9: #error "wxUSE_VALIDATORS must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:960:9: #error "wxUSE_WXHTML_HELP must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:968:9: #error "wxUSE_XRC must be defined."
C:/wxWidgets-2.8.7/include/wx/chkconf.h:1765:9: #error "wxMessageBox is always needed"
In file included from C:/wxWidgets-2.8.7/include/wx/region.h:222,
                 from C:/wxWidgets-2.8.7/include/wx/window.h:26,
                 from C:/wxWidgets-2.8.7/include/wx/wx.h:36,
                 from ..\helloWorld.cpp:6:
C:/wxWidgets-2.8.7/include/wx/msw/region.h: In constructor `wxRegion::wxRegion(const wxBitmap&, const wxColour&, int)':
C:/wxWidgets-2.8.7/include/wx/msw/region.h:31: error: no matching function for call to `wxRegion::Union(const wxBitmap&, const wxColour&, int&)'
C:/wxWidgets-2.8.7/include/wx/region.h:128: note: candidates are: bool wxRegionBase::Union(wxCoord, wxCoord, wxCoord, wxCoord)
C:/wxWidgets-2.8.7/include/wx/region.h:130: note:                 bool wxRegionBase::Union(const wxRect&)
C:/wxWidgets-2.8.7/include/wx/region.h:132: note:                 bool wxRegionBase::Union(const wxRegion&)
..\helloWorld.cpp: In constructor `MyFrame::MyFrame(const wxString&, const wxPoint&, const wxSize&)':
..\helloWorld.cpp:50: error: invalid use of undefined type `struct wxMenu'
C:/wxWidgets-2.8.7/include/wx/event.h:37: error: forward declaration of `struct wxMenu'
..\helloWorld.cpp:53: error: invalid use of undefined type `struct wxMenu'
C:/wxWidgets-2.8.7/include/wx/event.h:37: error: forward declaration of `struct wxMenu'
..\helloWorld.cpp:54: error: invalid use of undefined type `struct wxMenu'
C:/wxWidgets-2.8.7/include/wx/event.h:37: error: forward declaration of `struct wxMenu'
..\helloWorld.cpp:55: error: invalid use of undefined type `struct wxMenu'
C:/wxWidgets-2.8.7/include/wx/event.h:37: error: forward declaration of `struct wxMenu'
..\helloWorld.cpp:57: error: invalid use of undefined type `struct wxMenuBar'
C:/wxWidgets-2.8.7/include/wx/frame.h:26: error: forward declaration of `struct wxMenuBar'
..\helloWorld.cpp:58: error: invalid use of undefined type `struct wxMenuBar'
C:/wxWidgets-2.8.7/include/wx/frame.h:26: error: forward declaration of `struct wxMenuBar'
..\helloWorld.cpp:60: error: `SetMenuBar' was not declared in this scope
..\helloWorld.cpp:62: error: `CreateStatusBar' was not declared in this scope
..\helloWorld.cpp:63: error: `SetStatusText' was not declared in this scope
..\helloWorld.cpp:60: warning: unused variable 'SetMenuBar'
..\helloWorld.cpp:62: warning: unused variable 'CreateStatusBar'
..\helloWorld.cpp:63: warning: unused variable 'SetStatusText'
..\helloWorld.cpp: In member function `void MyFrame::OnAbout(wxCommandEvent&)':
..\helloWorld.cpp:73: error: `wxMessageBox' was not declared in this scope
..\helloWorld.cpp:73: warning: unused variable 'wxMessageBox'
Build error occurred, build is stopped
Time consumed: 5656  ms.
La seule réponse trouvé sur d'autres forum c'est réinstaller wxwidgets, chose que j'ai fait 2 fois mais sans résultats, j'ai toujours les mêmes erreurs.

le code :

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
67
68
69
70
71
72
73
74
/*
 * hworld.cpp
 * Hello world sample by Robert Roebling
 */
 
#include "wx/wx.h" 
 
class MyApp: public wxApp
{
    virtual bool OnInit();
};
 
class MyFrame: public wxFrame
{
public:
 
    MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
 
    void OnQuit(wxCommandEvent& event);
    void OnAbout(wxCommandEvent& event);
 
    DECLARE_EVENT_TABLE()
};
 
enum
{
    ID_Quit = 1,
    ID_About,
};
 
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
    EVT_MENU(ID_Quit, MyFrame::OnQuit)
    EVT_MENU(ID_About, MyFrame::OnAbout)
END_EVENT_TABLE()
 
IMPLEMENT_APP(MyApp)
 
bool MyApp::OnInit()
{
    MyFrame *frame = new MyFrame( _T("Hello World"), wxPoint(50,50), wxSize(450,340) );
    frame->Show(TRUE);
    SetTopWindow(frame);
    return TRUE;
} 
 
MyFrame::MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size)
: wxFrame((wxFrame *)NULL, -1, title, pos, size)
{
 
    wxMenu *menuFile = new wxMenu;
 
 
    menuFile->Append( ID_About, _T("&About...") );
    menuFile->AppendSeparator();
    menuFile->Append( ID_Quit, _T("E&xit") );
 
    wxMenuBar *menuBar = new wxMenuBar;
    menuBar->Append( menuFile, _T("&File") );
 
    SetMenuBar( menuBar );
 
    CreateStatusBar();
    SetStatusText( _T("Welcome to wxWindows!") );
}
 
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
    Close(TRUE);
}
 
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
    wxMessageBox(_T("This is a wxWindows Hello world sample"),_T("About Hello World"), wxOK | wxICON_INFORMATION, this);
}


Merci pour votre aide.