Re: linking Fortran subroutines
Re: linking Fortran subroutines
- Subject: Re: linking Fortran subroutines
- From: John Weeks <email@hidden>
- Date: Thu, 13 Apr 2006 10:36:02 -0700
I just posted the following:
>I am calling a couple of Fortran 95 subroutines from C++ code. The simpler
>subroutine works fine; its parameters are all scalar ints and doubles. The
>other one works almost...
>
>It includes a number of arrays, many of which are optional. I have
>included flags in the parameter list that indicate whether or not the
>arrays should be accessed. I am getting a crash while accessing one of
>these flags (the flags are all ints). The one that causes the crash is the
>last parameter in the call list, suggesting to me that I have not
>understood the layout of the Fortran call list, and how that translates
>into a call from C++.
>
>Is there some way to get information on the sizes and locations of the
>parameters? I can step into the fortran routines in the XCode gdb window,
>but all the variables in the variables window are shown as "not in scope".
>
>gfortran -dumpversion gives "GNU Fortran 95 (GCC) 4.2.0 20060315
>(experimental)"
>I am using XCode 2.2 on OS X 10.4.5.
>
>Thanks!!!
Amazing how posting to a mailing list clarifies the mind! I just noticed
that in my C prototype I had declared the last array parameter as a double
instead of a double *. Fixing that made it work...
I would still be interested in knowing about tools to inspect object files
in some detail, however. Just in case I run into something in the future
that can't be fixed by a careful re-reading of my code :)
Regards,
John Weeks
WaveMetrics, Inc.
Phone (503) 620-3001
Fax (503) 620-6754
email email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden