Boost logo

Boost-Build :

Subject: [Boost-build] Problem with linking to prebuild library
From: tr1gun (tr1gun_at_[hidden])
Date: 2009-05-19 14:50:49


Hello,

i have a problem with building a dll that links to a prebuild dll. I have declared following targets in ftdi.jam:

    searched-lib ftddriver :
                    : <name>ftd2xx
                        <include>$(inc_dir)
                        <search>$(lib_dir)
                    :
                    : <include>$(inc_dir)
                        <search>$(lib_dir)
                    ;

    lib ftdi2cdriver : [ path.glob $(location)/ftdi_i2c : *.cpp ]
                            ftddriver
                      : <include>$(inc_dir)
                          <define>FTCI2C_EXPORTS
                          <define>_USRDLL
                      : <link>shared
                      :
                      ;

The command to build is:
bjam --user-config=config.jam /ftdi//ftdi2cdriver link=shared

It prints out that there are some targets but doesn't build anything.
If you remove the ftddriver line in the ftdi2cdriver target it builds the cpp files but fails linking as it is missing the lib file.
Anyone knows what is wrong? I have attached the jam files.

Best regards,

Bernhard


local default-build =
        debug
        <threading>multi
        <link>static
        <runtime-link>shared
        ;

project dvms_board
        : source-location src
        : build-dir bin
        : default-build $(default-build)
        ;

using msvc : 8.0 ;
using testing ;
using qt4 : C:/libs/qt-win-opensource-src-4.5.1 ;
using boost : 1.39 : C:/libs/boost_1_39_0/ : C:/libs/boost_1_39_0/stage/lib ;
using ftdi : src_ftdi ;

import modules ;
import project ;
import path ;

project.initialize $(__name__) ;
project ftdi ;

rule init ( location )
{
    local inc_dir = $(location)/include ;
    local lib_dir = $(location)/lib ;
    
    searched-lib ftddriver :
                    : <name>ftd2xx
                        <include>$(inc_dir)
                        <search>$(lib_dir)
                    :
                    : <include>$(inc_dir)
                        <search>$(lib_dir)
                    ;
    lib ftdspidriver :
                        : <name>FTCSPI
                            <include>$(inc_dir)
                            <search>$(lib_dir)
                        :
                        : <include>$(inc_dir)
                            <search>$(lib_dir)
                        ;

    lib ftdi2cdriver :
                        : <name>FTCI2C
                            <include>$(inc_dir)
                            <search>$(lib_dir)
                        :
                        : <include>$(inc_dir)
                            <search>$(lib_dir)
                        ;
    lib ftdi2cdriver_src : [ path.glob $(location)/ftdi_i2c : *.cpp ]
                            ftddriver
                        : <include>$(inc_dir)
                            <define>FTCI2C_EXPORTS
                            <define>_USRDLL
                        : <link>shared
                        :
                        ;
    lib rsi2cdriver : [ path.glob $(location)/rsfti2c : *.cpp ]
                        : <include>$(inc_dir)
                        :
                        : <define>RS_FTDI_I2C_DRIVER
                        ;
}


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