I am learning wxWidgets to break free of console programming. I use Dev-C++, and I have installed all necessary DevPaks, and everything should work fine, except when I try and compile this code, I get:
[Linker error] undefined reference to `WinMain@16'
ld returned 1 exit status
C:\Dev-Cpp\Makefile.win [Build Error] [Testing.exe] Error 1
#include <wx/wxprec.h>
#include <wx/wx.h>
// Declare the application class
class MyApp : public wxApp
{
public:
// Called on application startup
virtual bool OnInit();
};
bool MyApp::OnInit()
{
// Create the main application window
wxFrame *frame = new wxFrame;
// Show it
frame->Show(true);
// Start the event loop
return true;
}
Please help me fix what's wrong, thank you. :)