wxWidgets Problem ...
-
Hey Leute.
Habe mal ein kleines Prog oder eher das Grundgerüst aber es will nicht laufen der Linker sagt nur folgendes:C:\Programme\CodeBlocks\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\libmingw32.a(main.o):main.c:(.text+0x104)||undefined reference to `_WinMain@16'|
||=== Build finished: 1 errors, 0 warnings ===|Weiß jemand von euch was da los ist?
Mein Code:
// ProggersArchivControlCenter.hpp #ifndef PROGGERS_ARCHIV_CONTROL_CENTER_HPP #define PROGGERS_ARCHIV_CONTROL_CENTER_HPP #include <wx/wx.h> class PACC_App : public wxApp { public: virtual bool OnInit(); }; class ThePACC : public wxFrame { private: wxPanel* ThePanel; DECLARE_EVENT_TABLE() public: ThePACC(const wxChar* title, int xPos, int yPos, int wigth, int height); ~ThePACC(); void CreateWindowEvent(wxWindowCreateEvent &event); }; #endif // PROGGERS_ARCHIV_CONTROL_CENTER_HPP
// ProggersArchivControlCenter.cpp #include "ProggersArchivControlCenter.hpp" /* Applikation */ bool PACC_App::OnInit() { ThePACC *Frame = new ThePACC("Progger's Archiv Control Center",200,200,450,300); // Frame->SetIcon(wxICON(ICO)); Frame->Show(true); SetTopWindow(Frame); return true; } /* Eigentliche Anwendung */ ThePACC::ThePACC(const wxChar* title, int xPos, int yPos, int width, int height) : wxFrame((wxFrame*) NULL,-1,title,wxPoint(xPos,yPos),wxSize(width,height)) { ThePanel = new wxPanel(this,wxID_ANY,wxDefaultPosition,wxSize(450,300)); CreateStatusBar(1); } ThePACC::~ThePACC() { } BEGIN_EVENT_TABLE(ThePACC,wxFrame) EVT_WINDOW_CREATE(ThePACC::CreateWindowEvent) END_EVENT_TABLE() void ThePACC::CreateWindowEvent(wxWindowCreateEvent &event) { SetStatusText("..."); }
Mfg Wikinger75!
-
nach der App-Class in .h:
DECLARE_APP(PACC_App)und in .cpp:
IMPLEMENT_APP(PACC_App)
-
hmm... stimmt hab ich ja voll übersehn^^
thx for help.