Bonjour

Je suis sous Fedora Core 3. Pour un projet, je dois installer et utiliser wxWidgets. J'ai donc téléchargé wxX11-2.6.2.tar.gz sur le site de wxWidgets. Je l'ai compilé en suivant la méthode indiqué :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
 
> ./configure --with-x11
> make
> su <type root password>
> make install
> ldconfig
> exit
Pas de problème jusque là.
J'ai ensuite voulu testé un programme simple, type hello world, pour tester :
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
 
// wxhello.cpp
// Version using dynamic event routing
// Robert Roebling, Martin Bernreuther
 
#include <wx/wx.h>
 
 
class MyApp : public wxApp
{
	virtual bool OnInit();
};
 
IMPLEMENT_APP(MyApp)
 
 
class MyFrame : public wxFrame
{
public:
	MyFrame(const wxString& title, const wxPoint& pos, const wxSize& size);
	void OnQuit(wxCommandEvent& event);
	void OnAbout(wxCommandEvent& event);
};
 
enum
{
	ID_Quit=1,
	ID_About
};
 
 
bool MyApp::OnInit()
{
	MyFrame *frame = new MyFrame("Hello World", wxPoint(50,50),
                wxSize(450,350));
 
	frame->Connect( ID_Quit, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction) &MyFrame::OnQuit );
	frame->Connect( ID_About, wxEVT_COMMAND_MENU_SELECTED,
		(wxObjectEventFunction) &MyFrame::OnAbout );
 
	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)
{
	// create menubar
	wxMenuBar *menuBar = new wxMenuBar;
	// create menu
	wxMenu *menuFile = new wxMenu;
	// append menu entries
	menuFile->Append(ID_About,"&About...");
	menuFile->AppendSeparator();
	menuFile->Append(ID_Quit,"E&xit");
	// append menu to menubar
	menuBar->Append(menuFile,"&File");
	// set frame menubar
	SetMenuBar(menuBar);
 
	// create frame statusbar
	CreateStatusBar();
	// set statusbar text
	SetStatusText("Welcome to wxWindows!");
}
 
void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
{
	Close(TRUE);
}
 
void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
{
	wxMessageBox("wxWindows Hello Word example.","About Hello World",
                wxOK|wxICON_INFORMATION, this);
}
Je l'ai compilé en utilisant la ligne suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
g++ hello.cpp `wx-config --libs` `wx-config --cxxflags` -o hello
Pas de problème non plus à la compilation, mo nexécutable est bien généré.
L'ennui vient de l'exécution :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
 
$ ./hello
./hello: error while loading shared libraries: libwx_x11univ_xrc-2.6.so.0: cannot open shared object file: No such file or directory

Donc, comment résoudre ce souci ?

Merci d'avance de vos réponse

@++