Bonjour,

Les affaires avancent. J'ai produit ce makefile, avec mes petits doigts musclés :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
CPP = g++
CXXFLAGS = -Wall -I/usr/include/wx-2.6 -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1  -D__WXGTK__ -pthread
LDFLAGS = -L/usr/lib -lwx_baseu-2.6 -lwx_baseu_net-2.6 -lwx_baseu_xml-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_gtk2u_gizmos-2.6 -lwx_gtk2u_gizmos_xrc-2.6 -lwx_gtk2u_gl-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_media-2.6 -lwx_gtk2u_ogl-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_stc-2.6 -lwx_gtk2u_svg-2.6 -lwx_gtk2u_xrc-2.6
EXE = test.exe
all: $(EXE)
 
test.exe: test.cpp test.h
        $(CPP) -o test.exe $(CXXFLAGS) test.cpp $(LDFLAGS)
 
clean:
        rm -rf *~ *.exe \
Ce qui produit le résultat suivant :

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
[bletry@hamlet ~/test]$ make
g++ -o test.exe -Wall -I/usr/include/wx-2.6 -I/usr/lib/wx/include/gtk2-unicode-release-2.6 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1  -D__WXGTK__ -pthread test.cpp -L/usr/lib -lwx_baseu-2.6 -lwx_baseu_net-2.6 -lwx_baseu_xml-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6 -lwx_gtk2u_gizmos-2.6 -lwx_gtk2u_gizmos_xrc-2.6 -lwx_gtk2u_gl-2.6 -lwx_gtk2u_html-2.6 -lwx_gtk2u_media-2.6 -lwx_gtk2u_ogl-2.6 -lwx_gtk2u_qa-2.6 -lwx_gtk2u_stc-2.6 -lwx_gtk2u_svg-2.6 -lwx_gtk2u_xrc-2.6
/tmp/cccpO2RQ.o(.text+0x1e1): In function `testapp::OnInit()':
: undefined reference to `wxPoint::wxPoint(int, int)'
/tmp/cccpO2RQ.o(.text+0x200): In function `testapp::OnInit()':
: undefined reference to `wxSize::wxSize(int, int)'
/tmp/cccpO2RQ.o(.text+0x2f4): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
/tmp/cccpO2RQ.o(.text+0x351): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenu::wxMenu(long)'
/tmp/cccpO2RQ.o(.text+0x3b8): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)'
/tmp/cccpO2RQ.o(.text+0x41f): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::AppendSeparator()'
/tmp/cccpO2RQ.o(.text+0x462): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)'
/tmp/cccpO2RQ.o(.text+0x688): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxFrame::wxFrame(wxWindow*, int, wxString const&, wxPoint const&, wxSize const&, long, wxString const&)'
/tmp/cccpO2RQ.o(.text+0x6e5): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenu::wxMenu(long)'
/tmp/cccpO2RQ.o(.text+0x74c): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)'
/tmp/cccpO2RQ.o(.text+0x7b3): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::AppendSeparator()'
/tmp/cccpO2RQ.o(.text+0x7f6): In function `testFrame::testFrame(wxString const&, wxPoint const&, wxSize const&)':
: undefined reference to `wxMenuBase::Append(int, wxString const&, wxString const&, wxItemKind)'
/tmp/cccpO2RQ.o(.text+0xb58): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `wxEventTableEntry::wxEventTableEntry(int const&, int, int, void (wxObject::*)(wxEvent&), wxObject*)'
/tmp/cccpO2RQ.o(.text+0xb7e): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `wxEventTableEntry::wxEventTableEntry(int const&, int, int, void (wxObject::*)(wxEvent&), wxObject*)'
/tmp/cccpO2RQ.o(.text+0xba4): In function `__static_initialization_and_destruction_0(int, int)':
: undefined reference to `wxEventTableEntry::wxEventTableEntry(int const&, int, int, void (wxObject::*)(wxEvent&), wxObject*)'
/tmp/cccpO2RQ.o(.gnu.linkonce.t._ZNK9wxAppBase12GetTopWindowEv+0x23): In function `wxAppBase::GetTopWindow() const':
: undefined reference to `wxListBase::GetCount() const'
/tmp/cccpO2RQ.o(.gnu.linkonce.t._ZNK9wxAppBase12GetTopWindowEv+0x37): In function `wxAppBase::GetTopWindow() const':
: undefined reference to `wxWindowList::GetFirst() const'
/tmp/cccpO2RQ.o(.gnu.linkonce.t._ZNK9wxAppBase12GetTopWindowEv+0x40): In function `wxAppBase::GetTopWindow() const':
: undefined reference to `wxWindowListNode::GetData() const'
collect2: ld a retourné 1 code d'état d'exécution
make: *** [test.exe] Erreur 1
Et là, je dois dire que je ne sais plus trop quoi faire... Il me semblait avoir bien indiqué tous les chemins et tout pour les librairies, mais bof... Est-ce que quelqu'un aurait des suggestions ?

Merci

Hugo