Hi,
I maintain OpenInventor for Debian. Some of the Debian architectures
use GCC 3.0, which complains if the main() function is not declared
to return "int". The following patch rectifies this for the apps
and demos that get built. I didn't touch the "mentor" sample code.
Regards,
-Steve
Index: apps/demos/SceneViewer/SceneViewer.c++
===================================================================
RCS file:
/home/steve/lib/cvs/debian/inventor/apps/demos/SceneViewer/SceneViewer.c++,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 SceneViewer.c++
--- apps/demos/SceneViewer/SceneViewer.c++ 14 Oct 2000 10:46:05 -0000
1.1.1.1
+++ apps/demos/SceneViewer/SceneViewer.c++ 13 Feb 2002 14:25:20 -0000
@@ -138,7 +138,7 @@
}
-void main(int argc, char **argv)
+int main(int argc, char **argv)
{
Widget mainWindow;
SoSceneViewer *sv;
@@ -230,4 +230,5 @@
// Loop forever
//
SoXt::mainLoop();
+ return 0;
}
Index: apps/demos/drop/drop.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/apps/demos/drop/drop.c++,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 drop.c++
--- apps/demos/drop/drop.c++ 14 Oct 2000 10:46:05 -0000 1.1.1.1
+++ apps/demos/drop/drop.c++ 13 Feb 2002 14:28:05 -0000
@@ -69,7 +69,7 @@
|
_______________________________________________________________________
*/
-void
+int
main( int, char **argv )
{
// Initialize Inventor and Xt
@@ -93,6 +93,7 @@
// Enter the Xt event loop
SoXt::show( appWindow );
SoXt::mainLoop();
+ return 0;
}
Index: apps/demos/gview/gview.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/apps/demos/gview/gview.c++,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 gview.c++
--- apps/demos/gview/gview.c++ 29 Oct 2000 15:04:15 -0000 1.1.1.1
+++ apps/demos/gview/gview.c++ 13 Feb 2002 14:29:14 -0000
@@ -392,7 +392,7 @@
// Mainline.
//
-void
+int
main(int argc, char **argv)
//
////////////////////////////////////////////////////////////////////////
Index: apps/demos/maze/maze.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/apps/demos/maze/maze.c++,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 maze.c++
--- apps/demos/maze/maze.c++ 29 Oct 2000 15:04:15 -0000 1.1.1.1
+++ apps/demos/maze/maze.c++ 13 Feb 2002 14:30:24 -0000
@@ -1143,7 +1143,7 @@
ra->setOverlaySceneGraph(logo);
}
-void
+int
main(int argc, char *argv[])
{
Widget mainWindow;
@@ -1332,5 +1332,6 @@
SoXt::show(mainWindow);
SoXt::mainLoop();
+ return 0;
}
Index: apps/demos/noodle/noodle.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/apps/demos/noodle/noodle.c++,v
retrieving revision 1.1.1.2
diff -u -b -B -r1.1.1.2 noodle.c++
--- apps/demos/noodle/noodle.c++ 25 Sep 2001 00:45:25 -0000 1.1.1.2
+++ apps/demos/noodle/noodle.c++ 13 Feb 2002 14:31:00 -0000
@@ -279,7 +279,7 @@
interface->fileQuitEvent();
}
-void
+int
main(int argc, char **argv)
{
// Parse command line arguments. This may fill in the
@@ -679,5 +679,6 @@
SoXt::show(mainWindow);
SoXt::mainLoop();
+ return 0;
}
Index: apps/demos/textomatic/textomatic.c++
===================================================================
RCS file:
/home/steve/lib/cvs/debian/inventor/apps/demos/textomatic/textomatic.c++,v
retrieving revision 1.2
diff -u -b -B -r1.2 textomatic.c++
--- apps/demos/textomatic/textomatic.c++ 16 Dec 2001 20:13:18 -0000
1.2
+++ apps/demos/textomatic/textomatic.c++ 13 Feb 2002 14:31:30 -0000
@@ -402,7 +402,7 @@
const int Vert2 = 60;
Labels labels; // Global variable.
-void
+int
main(int argc, char **argv)
{
XtSetLanguageProc( NULL, _myXtDefaultLanguageProc, NULL );
@@ -540,4 +540,5 @@
SoXt::show(w);
SoXt::mainLoop();
+ return 0;
}
Index: apps/samples/widgets/componentTest.c++
===================================================================
RCS file:
/home/steve/lib/cvs/debian/inventor/apps/samples/widgets/componentTest.c++,v
retrieving revision 1.1.1.1
diff -u -b -B -r1.1.1.1 componentTest.c++
--- apps/samples/widgets/componentTest.c++ 29 Oct 2000 15:04:17 -0000
1.1.1.1
+++ apps/samples/widgets/componentTest.c++ 13 Feb 2002 14:15:00 -0000
@@ -59,7 +59,8 @@
exit(0);
}
-void
+
+int
main(unsigned int argc, char *argv[])
{
if (argc != 2)
@@ -85,4 +86,5 @@
XtRealizeWidget(mainWindow);
SoXt::mainLoop();
+ return 0;
}
Index: apps/tools/ivview/ivview.c++
===================================================================
RCS file: /home/steve/lib/cvs/debian/inventor/apps/tools/ivview/ivview.c++,v
retrieving revision 1.3
diff -u -b -B -r1.3 ivview.c++
--- apps/tools/ivview/ivview.c++ 18 Dec 2001 04:50:37 -0000 1.3
+++ apps/tools/ivview/ivview.c++ 13 Feb 2002 14:17:42 -0000
@@ -1107,7 +1107,7 @@
///////////////////////////////////////////////////////////////////
//
-void
+int
main(int argc, char **argv)
{
XtAppContext appContext;
@@ -1170,4 +1170,5 @@
setBusyCursor(FALSE);
SoXt::mainLoop();
+ return 0;
}
--
by Rocket to the Moon,
by Airplane to the Rocket,
by Taxi to the Airport,
by Frontdoor to the Taxi,
by throwing back the blanket and laying down the legs ...
- They Might Be Giants
|