diff options
-rw-r--r-- | include/Main.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/Main.h b/include/Main.h index 8217a48..4c71c4e 100644 --- a/include/Main.h +++ b/include/Main.h @@ -22,6 +22,12 @@ class Main : public Base { }; #define CODE_BEGINS class Appli : public Main { -#define CODE_ENDS }; extern "C" {int main(int argc, char ** argv) { return Main::truemain(&Appli(), argc, argv, environ); } } +#define CODE_ENDS }; extern "C" {int main(int argc, char ** argv) { \ + int r; \ + Appli * Application = new Appli(); \ + r = Main::truemain(Application, argc, argv, environ); \ + delete Application; \ + return r; \ +} } #endif |