wxwidgets installation



  • hu,

    kann man wxwidgets das ich mit visual c .net gebuildet habe auch mit dem dev-cpp nutzen?
    oder brauch ich für dev-cpp das hier:
    http://www.andre-simon.de/zip/download.html#devpak
    -> wxWidgets-2.6.1-msw-static.devpak (4,8 MB)

    warum heisst das static?

    ciao



  • kann man wxwidgets das ich mit visual c .net gebuildet habe auch mit dem dev-cpp nutzen?

    nein

    static weils nicht dlls benutzt.



  • hab die selben einstellungen:
    http://www.andre-simon.de/doku/wxwidgets/devpak_install.html

    fehlt noch ne lib?

    main.o(.rdata$_ZTV5MyApp[vtable for MyApp]+0xa4):main.cpp: undefined reference to `wxAppConsole::CreateLogTarget()'
    main.o(.rdata$_ZTV5MyApp[vtable for MyApp]+0xa8):main.cpp: undefined reference to `wxAppConsole::CreateMessageOutput()'
    main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x138):main.cpp: undefined reference to `wxWindow::RegisterHotKey(int, int, int)'
    main.o(.rdata$_ZTV7MyFrame[vtable for MyFrame]+0x13c):main.cpp: undefined reference to `wxWindow::UnregisterHotKey(int)'
    


  • hi,
    welche libs, includes unter project settings bzw Compiler and Linker settings habt ihr beim dev-cpp?
    damit ich das mal vergleichen kann...

    hier mal das test-proggi:

    // 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);
    }
    

    ciao



  • fehler found;-)

    #include <wx/wx.h>  <--- falsch
    #include "wx/wx.h"  <--- richtig
    

    ciao



  • Das müsste aber andere Fehlermeldungen ausspucken...



  • Hallo,
    ich wollte mich auch ein bischen mit wxWidgets beschäftigen und hätte deshalb mal eine Frage:
    Wenn ich wxWidgets mit DevCpp nutzen will, reicht es dann nur das DevPack herunterzuladen oder brauche ich auch die lib von der Projektseite? Oder reicht nur die lib ohne DevPack?



  • Es gibt ne spezielle Widgets Version von Dev-Cpp mit grafischem GUI Designer unter http://wxdsgn.sourceforge.net/ .



  • #include <wx/wx.h> <--- RICHTIG
    ( seid's zufällig Windows User? )

    c++coder. schrieb:

    fehler found;-)

    #include <wx/wx.h>  <--- falsch
    #include "wx/wx.h"  <--- richtig
    

    ciao


Anmelden zum Antworten