Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2006-05-17 11:16:31


>>
>> 1- the file testpostfor is compiled with "g++", is it possible to change
>> it in such a way so that it gets compiled with "g77"?
>
> Should not "g++" do the right thing about .f files?
>

This 'workaround' might only work with gcc/f77. But not all
compiler-drivers are that intelligent.

>> (Now I have changed gfortran.jam, but I don't want to do it that way)
>>
>> 2- When linking "testf" it also use "g++", so, how to link with "g77"?
>> When linking with g++ it fails because there is no main defined, but
>> with g77 it links without problem.
>
> Would you mind using different type for that, say:
>
> fortran_exe testf : ......
>

This is not a complete solution IMHO. What if you want to link an
executable that contains object-files that are compiled by the fortran
compiler as well as the C++ compiler? On that case you need to link with
the Fortran library as well as the C++ library!

How this should be handled IMHO is that the runtime libraries of the
compiler used generate an object-file should be propagates just like
usage-requirements on the object-file. These usage-requirements are thus
propagated to the executable when it will be linked using this object-file.

toon


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