From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,1981f5c6348c8bb0 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1994-03-23 09:28:43 PST Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!gumby!newsxfer.itd.umich.edu!sol.ctr.columbia.edu!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!jac.zko.dec.com!quark.enet.dec.com!lionel From: lionel@quark.enet.dec.com (Steve Lionel) Newsgroups: comp.sys.dec Subject: Re: Help! C FORTRAN on ALPHA/OSF version 1.3 Date: 23 Mar 1994 17:28:43 GMT Organization: Digital Equipment Corporation, Nashua NH Distribution: world Message-ID: <2mpu8b$4j8@jac.zko.dec.com> References: <2mpm9h$4e9@paperboy.gsfc.nasa.gov> Reply-To: lionel@quark.enet.dec.com (Steve Lionel) NNTP-Posting-Host: QUARK Keywords: C,FORTRAN,ALPHA,DEC,OSF X-Newsreader: mxrn 6.18-13 In article <2mpm9h$4e9@paperboy.gsfc.nasa.gov>, kent@kentaurus.dftsrv.gsfc.nasa.gov (James Kent Blackburn) writes: |>I have found a problem in having a C main function call a FORTRAN |>subroutine while using the latest version (1.3) of the OSF operating |>system on an Alpha workstation. This same code works great on machines |>using the version 1.2 OSF operating system. Running this very simple test |>program causes a segmentation fault immediately upon entering the main |>function! The code and Makefile is shown below. Please send replies via |>internet email to kent@kentaurus.gsfc.nasa.gov. Thanks... I tried this on a DEC OSF/1 V2.0 baselevel and it worked fine. I don't have ready access to a V1.3 system to try it there. We generally recommend using the f77 driver to link mixed Fortran and C code. Use the -nofor_main switch to tell it that the main program isn't Fortran. Give that a try and see what happens. -- Steve Lionel Mail: lionel@quark.enet.dec.com SDT Languages Group WWW: http://www.digital.com/pub/ Digital Equipment Corporation Digital/info/html/slionel.html 110 Spit Brook Road, ZKO2-3/N30 Nashua, NH 03062-2698 "Free advice is worth every cent"