[Proj] Building for and calling from g95-MinGW
Gerald I. Evenden
geraldi.evenden at gmail.com
Wed Feb 18 10:09:36 EST 2009
On Wednesday 18 February 2009 7:01:00 am Jan Hartmann wrote:
> Long ago, I did this using named common blocks and extern C structs. Why
> won't you use named common blocks? I understand the dangers of the
> unnamed common, though.
>
> Fortran 90 seems to have more possibilities for data representation. I
> never worked with it, but see an example at:
>
> http://gcc.gnu.org/ml/gcc-help/2008-01/msg00170.html
>
> Jan
My original question was not a particularly serious one and I was only
interested if there was a trick to using FORTRAN that I was unaware of when
dealing with C[++] structures.
I am aware of the 'common' usage and that was why I was trying to excude it
from the conversation. 'common' is quite restrictive compared to general
usage of passing structures and pointers through program processes.
The only other point that I would make about intermixing FORTRAN and C[++] is
that I would only consider using C as the entry mechanism and any FORTRAN
code would be processes called by C.
Because of my personal history of starting with machine language and then
graduating to Balgol 58 and then Algol 60 before being sent into the
purgatory of what I call the "Dark Ages" where I was forced to use FORTRAN
for several years, I have a rather jaundice opinion of the language.
> Gerald I. Evenden wrote:
> > In simple cases FORTRAN and C[++] are not too difficult to link but there
> > is one issue I can't find a solution in Google searching:
> >
> > How do you handle C structures in FORTRAN? Do not include "common."
> >
> > Just curious if anyone has an answer.
> >
> > On Tuesday 17 February 2009 2:53:03 pm Arjan van Dijk wrote:
> >> Hi!
> >>
> >> I compile and run my program on linux and Windows boxes.
> >> Under Fortran-90 that is...
> >> Now I would like to use Proj. I have 2 questions about this:
> >>
> >> Question 1:
> >> How do I generate/download an archive file (e.g. libproj.a)
> >> that can be used from g95 under MinGW by just adding -lproj to the
> >> compile command of my program?
> >> The Windows binaries contain an executable and a dll, not a .a-file.
> >> Can I just use the linux .a-file under MinGW? I guess not.
> >> I downloaded the sources and called "./configure".
> >> This went okay. Then I tried "make", but the whole thing
> >> crashed... (see below this message for the rude curses it uttered)!
> >>
> >> Question 2:
> >> Are there any Fortran examples for using Proj?
> >>
> >> Regards,
> >>
> >>
> >> Arjan
> >
> > ...
--
The whole religious complexion of the modern world is due
to the absence from Jerusalem of a lunatic asylum.
-- Havelock Ellis (1859-1939) British psychologist
More information about the Proj
mailing list