Bonjour ,

je suis en train de developper une application graphique sous linux avec wxwidget de ce coté la aucun probleme j'ai ajouté a wxwidegt l'addon wxxml2 , je l'aie compilé et tout sans probleme le sample donné fonctionne aussi

je cherche a compiler ce code : GUI.cc

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
 
#include "GUI.h"
 
GUI::GUI(wxWindow* parent, int id, const wxString& title, const wxPoint& pos, const wxSize& size, long style) : 
			MyFrame(parent, id, title, pos, size, wxDEFAULT_FRAME_STYLE)
{
 Connect(button_1->GetId(),wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler(GUI::OnLoadXML));	
 
}
 
void GUI::LoadXML(const wxString &filename)
{
    wxXml2Document  doc;
    wxString err;
 
    wxFileInputStream tmp(filename);
    if (tmp.IsOk() && tmp.GetSize() > 2048)
 
    // parse the file
    if (!doc.Load(filename, &err)) {
        wxMessageBox(wxString::Format(
            wxT("Couldn't parse the file you chose:\n%s"), err.c_str()), wxT("Error"));
        return;
    }
 
    // show the wxXml2Node tree in a simple format...
    wxString tree;
    wxXml2Node root = doc.GetRoot();
    int indent = 3;
    tree.Alloc(1024);
 
    // show the DTD declaration, if present
    wxXml2DTD dtd(doc.GetDTD());
    if (dtd != wxXml2EmptyDTD) {
        tree += wxT("DTD name=") + dtd.GetName();
 
        if (dtd.IsPublicSubset()) 
            tree += wxT(" PUBLIC externalID=") + dtd.GetExternalID() +
                wxT(" externalURI=") + dtd.GetExternalURI() + wxT("\n\n");
 
        if (dtd.IsSystemSubset()) 
            tree += wxT(" SYSTEM systemID=") + dtd.GetSystemID() + wxT("\n\n");
    }
 
    // get a string with the tree structure...
   // ParseNodeAndSiblings(root, tree, indent);
 
    // show it to the user  
   text_ctrl_2->SetValue(tree);
 
    // cleanup
    dtd.DestroyIfUnlinked();
    root.DestroyIfUnlinked();
    doc.DestroyIfUnlinked();
 
}
 
void GUI::OnLoadXML(wxCommandEvent& WXUNUSED(event))
{
 
    wxFileDialog fd(this, wxT("Choose the XML file to load"), wxT(""), wxT(""), 
        wxT("XML and HTML files|*.xml;*.html;*.xhtml|All files|*.*"), wxOPEN);
    if (fd.ShowModal() == wxID_CANCEL)
        return;
 
    LoadXML(fd.GetPath());
    wxXml2Document tmpDoc;
    tmpDoc.Load(fd.GetPath());
]
GUI.h
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
#ifndef _GUI_H_
#define _GUI_H_
#include "MyFrame.h"
#include "wx/wx.h"
#include "wx/string.h"
#include "wx/object.h"
#include "wx/wfstream.h"
#include "wx/xml2def.h"
#include <libxml/xmlmemory.h>
#include <libxml/parser.h>   
 
class GUI : public MyFrame
{
 
	public:
		GUI(wxWindow* parent, int id, const wxString& title, const wxPoint& pos=wxDefaultPosition,
			const wxSize& size=wxDefaultSize, long style=wxDEFAULT_FRAME_STYLE);
		 ~GUI();
 
 
	void LoadXML(const wxString &filename);
	void OnLoadXML(wxCommandEvent& WXUNUSED(event));
 
	protected:
 
 
};
#endif	//_GUI_H_
pour cela j'utilise ANjuta avec les option de compilation suivante
CFLAGS=`xml2-config --cflags` `wx-config --cppflags --cxxflags`
LDFLAGS=`wx-config --libs` `xml2-config --lib`

mais l'EDI me renvoie l'erreur suivante :



quelqu"un peut -il m'aider a resoudre le probleme ?

d'avance merci