Boost logo

Boost-Build :

From: Jorge Suit Perez Ronda (josp_at_[hidden])
Date: 2006-05-15 13:02:15


Hello, I trying to link a fortran 'exe' target:

=============================================

exe testf
    :
    ../examples/testpostfor.f g2clib gidpost ;

=============================================

and I have a few questions:

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"?

(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.

best regards,

Jorge Suit

PD.

============ complete Jamroot ==================
# Jamfile for gidpost building

import modules ;

using gcc ;
using gfortran ;

path-constant GIDPOST_ROOT : .. ;

project gidpost-prj
    :
    source-location $(GIDPOST_ROOT)/source
    :
    requirements <include>$(GIDPOST_ROOT)
                 <include>$(GIDPOST_ROOT)/source
    ;

rule os-requirements ( )
{
    local result ;
    switch [ modules.peek : OS ]
    {
    case LINUX :
        {
            result = <define>f2cFortran ;
        }
    case NT :
        {
            result = <define>VISUAL_CPLUSPLUS ;
        }
    }
    return $(result) ;
}

lib gidpost
    :
    gidpost.cpp gidpostInt.cpp zlibint1.c zlibint2.c gidpostfor.c
    :
    [ os-requirements ]
    ;

lib g2clib : : <name>g2c ;

exe testc
    :
    ../examples/testpost.c gidpost ;

exe testf
    :
    ../examples/testpostfor.f g2clib gidpost ;


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