summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/Main.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/Main.h b/include/Main.h
index deadbdc..7f196f1 100644
--- a/include/Main.h
+++ b/include/Main.h
@@ -8,8 +8,8 @@ class Main : public Base {
Main();
virtual ~Main();
virtual int startup() throw (GeneralException) = 0;
- protected:
static int truemain(Main *, int, char **, char **);
+ protected:
int argc;
char ** argv;
char ** enve;
@@ -17,10 +17,9 @@ class Main : public Base {
private:
void set_args(int, char **, char **);
- friend int main(int, char **, char **);
};
#define CODE_BEGINS class Appli : public Main {
-#define CODE_ENDS }; int main(int argc, char ** argv, char ** enve) { return Main::truemain(&Appli(), argc, argv, enve); }
+#define CODE_ENDS }; extern "C" {int main(int argc, char ** argv) { return Main::truemain(&Appli(), argc, argv, environ); } }
#endif