On Wed, 24 Aug 2005, Peter W. Draper wrote: > On Wed, 24 Aug 2005, Starlink Software wrote: > >> Module: shl >> Status: failed >> Build Log: http://dev.starlink.ac.uk/build/SPARC-SOL9/logs/shl.1124847357.log > > Tim, > > this is FC_MAIN going wrong again. Under Solaris (as for ifort) this > function evaluates to "main", as there isn't a known alternate entry point > for this compiler, so there are two main functions. > > Don't know exactly what the problem you're fixing up is, but have you > tried calling STAR_INITIALISE_FORTRAN(argc, argv) (from inside of the > existing main), instead of declaring FC_MAIN? > The problem I have is that when linking a C program against the g95 runtime library it insists that MAIN_ has a definition otherwise OSX refuses to link the application. I've added these "dummy" MAIN_ routines to the C programs so that they even link. The C main is then called (and yes, they should all do a STAR_INITIALISE_FORTRAN in that case). I'd rather FC_MAIN was not defined if there wasn't an alternate entry point, then you'd know that you needed to STAR_INITIALISE_FORTRAN instead. Presumably it's a bad idea to do it twice? (and FC_MAIN doesn't take any arguments in general so you can't assume that FC_MAIN will translate to main()). Note that DIPSO no longer calls STAR_INITIALISE_FORTRAN because Norman tweaked it to take the fortran main directly. It sounds like it should use it but only if FC_MAIN is not defined. -- Tim Jenness JAC software http://www.jach.hawaii.edu/~timj