From fe4352799e228c1e03f20533def6c8f8efc0bda8 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Thu, 23 Jul 2009 22:25:15 +0000 Subject: [PATCH] Fixed an error on solaris that occurs because there are duplicate main() --- tools/templates/f77/demo_ftnlib.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tools/templates/f77/demo_ftnlib.cpp b/tools/templates/f77/demo_ftnlib.cpp index 53201cc57..2baa9bf06 100644 --- a/tools/templates/f77/demo_ftnlib.cpp +++ b/tools/templates/f77/demo_ftnlib.cpp @@ -74,7 +74,9 @@ extern "C" { /// This is the Fortran main program. This works for g77; it may /// need to be modified for other Fortran compilers +#ifdef NEED_ALT_MAIN extern int MAIN__(); +#endif /** * Read in a reaction mechanism file and create an IdealGasMix @@ -326,7 +328,13 @@ extern "C" { } - +/* + * HKM 7/22/09: + * I'm skeptical that you need this for any system. + * Definately creates an error (dupl main()) for the solaris + * system + */ +#ifdef NEED_ALT_MAIN /** * This C++ main program simply calls the Fortran main program. */ @@ -343,4 +351,4 @@ int main() { exit(-1); } } - +#endif