Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2008-04-02 00:58:03


On Wednesday 02 April 2008 01:39:05 Thomas Klimpel wrote:
> > I'm confused. Can you explicitly spell out what commands should be
> > invoked if sources list of an 'exe' target include a file with
> > the .f extension?
>
> The target
>
> exe compatible_calling_conventions :
> compatible_calling_convention.cpp fortran_functions.f
>
> should produce (more or less) the following commands
>
> g++ -c compatible_calling_convention.cpp
> g77 -c fortran_functions.f
> g++ -o compatible_calling_convention compatible_calling_convention.o fortran_functions.o -lg2c
>
>
> > > My system currently invokes the gcc-3.4 version of g77 by default,
> > > while c and c++ are compiled with gcc-4.1.3. This seems to be the
> > > recommended configuration for gcc-4.1. For gcc-4.2, the recommended
> > > configuration seems to be to invoke the gcc-4.2 version of gfortran by
> > default.
>
> The above is true for my current ubuntu system. For gcc-4.2 and above
>
> g++ -c compatible_calling_convention.cpp
> gfortran -c fortran_functions.f
> g++ -o compatible_calling_convention compatible_calling_convention.o fortran_functions.o -lgfortran
>
> are probably the commands. I can also do this on my curent system, but the resulting executable crashes with a segmentation fault. (I just tried it. I don't really care about this crash. I have to use g77 if I use gcc-4.1.3 to compile the cpp sources.)
>
> Did I succeed in creating even more confusion?

No, you failed in that :-) Things appear to be clear at this point. Almost.
Are those g77 and gfortran binaries a part of gcc, and typically installed in
the same directories, or some separate tool? I *guess* that gfortran should
be part of gcc, but that all is a wild guess.

- Volodya


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk