autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fortran module name mangling


From: Frederik Beaujean
Subject: Re: fortran module name mangling
Date: Mon, 19 Aug 2013 14:28:00 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130804 Thunderbird/17.0.8


On 08/19/2013 12:59 PM, Bastien ROUCARIES wrote:
> Hi did you try cfortran ?
> 
> It is a header only file what allow to link fortran with C and vice versa.
> 
> I use debian package and i maintain upstream.
> 
> http://packages.qa.debian.org/c/cfortran.html
> 
> Please report bug here
> http://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=cfortran
> 
> And download from here
> 
> http://bugs.debian.org/cgi-bin/pkgreport.cgi?repeatmerged=no&src=cfortran
> 
> I plan to modernize it, so please test it and report any error.
> 
> Please test plain old fortran call first not function that are part of module.
Yes, I looked into cfortran. Took me a while to find my way through the
docs, but it seems there is no mention of modules at all. The Fortran
code I want to call is not under my control, and I don't want to patch
it. Else I would add BIND(C) calls where necessary. For the same reason,
I can't move the subroutine out of its module either.

With cfortran, I end up with this linker error:

... undefined reference to `NESTRUN_'

Since cfortran doesn't deal with modules, that is the wrong name, should
be __nested_MOD_nestrun. Apart from that, cfortran.h did what it
promised to.
@Bastien: If I understand correctly, this is not a bug of cfortran, it
just doesn't support modules, right? Is module support part of what you
want to add when modernizing cfortran.h?

bye

Fred






reply via email to

[Prev in Thread] Current Thread [Next in Thread]