Mercurial > mxe-octave
changeset 1477:52b652c3e927
add test program for package wxwidgets
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Sun, 05 Dec 2010 18:37:02 +0100 |
parents | aada6ecef7dd |
children | 0ae61f0eea8b |
files | src/wxwidgets-test.cpp src/wxwidgets.mk |
diffstat | 2 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/wxwidgets-test.cpp Sun Dec 05 18:37:02 2010 +0100 @@ -0,0 +1,18 @@ +/* This file is part of mingw-cross-env. */ +/* See doc/index.html for further information. */ + +#include <wx/wx.h> + +class TestApp: public wxApp +{ +private: + bool OnInit() + { + wxFrame *frame = new wxFrame(0, -1, _("Hello, World!")); + frame->Show(true); + SetTopWindow(frame); + return true; + } +}; + +IMPLEMENT_APP(TestApp)
--- a/src/wxwidgets.mk Sun Dec 05 15:41:01 2010 +0100 +++ b/src/wxwidgets.mk Sun Dec 05 18:37:02 2010 +0100 @@ -117,4 +117,10 @@ # restore the unicode wx-config script mv '$(PREFIX)/$(TARGET)/bin/wx-config-backup' '$(PREFIX)/$(TARGET)/bin/wx-config' + + # build test program + '$(TARGET)-g++' \ + -W -Wall -Werror -pedantic -std=gnu++0x \ + '$(2).cpp' -o '$(PREFIX)/$(TARGET)/bin/test-wxwidgets.exe' \ + `'$(TARGET)-wx-config' --cflags --libs` endef