ASM allowed in Fortran? and OpenDir?
RadSurfer
RadSurfer@yahoo.com
Tue Aug 7 10:52:00 GMT 2007
Tobias Burnus <burnus <at> net-b.de> writes:
>
> RadSurfer wrote:
[snip]> >
> This slowly becomes a frequently ask question:
> http://gcc.gnu.org/ml/fortran/2007-07/msg00470.html
>
[snip]
> In principle the following program should do this; however, I only get
> NULL returned by opendir (with gfortran), a compiler error (g95) or an
> endless loop (NAG f95). Besides compiler errors, I think I made a
> mistake somewhere too.
>
> Tobias
>
> module mod
> use iso_c_binding
> implicit none
> integer(c_int), bind(c,name="errno") :: errno
> end module mod
[snip]
I tried my very best to copy and paste this great example of calling a C
( glibc? is that right? ) routine from Fortran, but I get this error:
[RadSurfer@centos ~]$ cd fortran
[RadSurfer@centos fortran]$ gfortran od.f95
In file od.f95:2
use iso_c_binding
1
Fatal Error: Can't open module file 'iso_c_binding.mod' for reading at (1): No
such file or directory
[RadSurfer@centos fortran]$
PLEASE... Can you kindly provide me with a working example of this!
I wish to print it out and study it. Most grateful.
//Rich//
PS:Thanks everyone.
More information about the Fortran
mailing list