A quick and dirty solution, because
recent gccs barf with errors when
trying to compile
int main (unsigned int, char**),
and do not accept an implicit cast calling
DXApplication::initialize.
A better solution would be to change
the first argument of DXApplication::initialize,
but I fear that this could require to change the code
in a lot of files.
Let me know if you think that, instead of this
quick solution, I should try to change
DXApplication::initialize.
Thanks,
Marco
Index: src/uipp/base/Application.h
===
RCS file: /cvsroot/opendx2/dx/src/uipp/base/Application.h,v
retrieving revision 1.13
diff -u -r1.13 Application.h
--- src/uipp/base/Application.h 11 Nov 2005 07:07:58 - 1.13
+++ src/uipp/base/Application.h 27 Jun 2008 07:08:17 -
@@ -49,7 +49,7 @@
//
// The main program needs to access protected member functions.
//
-friend int main(unsigned int argc,
+friend int main(int argc,
char** argv);
Index: src/uipp/dxui/Main.C
===
RCS file: /cvsroot/opendx2/dx/src/uipp/dxui/Main.C,v
retrieving revision 1.12
diff -u -r1.12 Main.C
--- src/uipp/dxui/Main.C6 Dec 2005 22:13:08 - 1.12
+++ src/uipp/dxui/Main.C27 Jun 2008 07:08:17 -
@@ -48,9 +48,12 @@
//
const char *AssertMsgString = "Internal error detected at \"%s\":%d.\n";
-int main(unsigned int argc,
+int main(int iargc,
char** argv)
{
+// recent gccs do not accept int main (unsigned int, char**),
+// but we need an unsigned int for DXApplication::initialize(&argc, argv)
+unsigned int argc = iargc;
#if defined(HAVE_HCLXMINIT)
// The following is not needed with the recent Exceed XDK. If you're
// using an XDK < 11.0 then uncomment the following command.
Index: src/uipp/mb/Main.C
===
RCS file: /cvsroot/opendx2/dx/src/uipp/mb/Main.C,v
retrieving revision 1.7
diff -u -r1.7 Main.C
--- src/uipp/mb/Main.C 20 May 2000 17:49:40 - 1.7
+++ src/uipp/mb/Main.C 27 Jun 2008 07:08:17 -
@@ -22,9 +22,12 @@
//
const char *AssertMsgString = "Internal error detected at \"%s\":%d.\n";
-int main(unsigned int argc,
+int main(int iargc,
char** argv)
{
+// recent gccs do not accept int main (unsigned int, char**),
+// but we need an unsigned int for DXApplication::initialize(&argc, argv)
+unsigned int argc = iargc;
#if defined(HAVE_HCLXMINIT)
HCLXmInit();
#endif
Index: src/uipp/prompter/Main.C
===
RCS file: /cvsroot/opendx2/dx/src/uipp/prompter/Main.C,v
retrieving revision 1.6
diff -u -r1.6 Main.C
--- src/uipp/prompter/Main.C16 May 2000 18:52:59 - 1.6
+++ src/uipp/prompter/Main.C27 Jun 2008 07:08:17 -
@@ -17,9 +17,12 @@
#endif
-int main(unsigned int argc,
+int main(int iargc,
char** argv)
{
+// recent gccs do not accept int main (unsigned int, char**),
+// but we need an unsigned int for DXApplication::initialize(&argc, argv)
+unsigned int argc = iargc;
#if defined(HAVE_HCLXMINIT)
HCLXmInit();
#endif
Index: src/uipp/startup/Main.C
===
RCS file: /cvsroot/opendx2/dx/src/uipp/startup/Main.C,v
retrieving revision 1.6
diff -u -r1.6 Main.C
--- src/uipp/startup/Main.C 16 May 2000 18:53:07 - 1.6
+++ src/uipp/startup/Main.C 27 Jun 2008 07:08:17 -
@@ -14,9 +14,12 @@
extern "C" void HCLXmInit();
#endif
-int main(unsigned int argc,
+int main(int iargc,
char** argv)
{
+// recent gccs do not accept int main (unsigned int, char**),
+// but we need an unsigned int for DXApplication::initialize(&argc, argv)
+unsigned int argc = iargc;
#if defined(HAVE_HCLXMINIT)
HCLXmInit();
#endif
Index: src/uipp/tutor/Main.C
===
RCS file: /cvsroot/opendx2/dx/src/uipp/tutor/Main.C,v
retrieving revision 1.7
diff -u -r1.7 Main.C
--- src/uipp/tutor/Main.C 16 May 2000 18:53:15 - 1.7
+++ src/uipp/tutor/Main.C 27 Jun 2008 07:08:17 -
@@ -31,9 +31,12 @@
//
const char *AssertMsgString = "Internal error detected at \"%s\":%d.\n";
-int main(unsigned int argc,
+int main(int iargc,
char** argv)
{
+// recent gccs do not accept int main (unsigned int, char**),
+// but we need an unsigned int for DXApplication::initialize(&argc, argv)
+unsigned int argc = iargc;
#if defined(HAVE_HCLXMINIT)
HCLXmInit();
#endif
___
OpenDX2-dev mailing list
OpenDX2-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/opendx2-dev