Boost logo

Boost-Build :

From: Motonari Ito (motonarii_at_[hidden])
Date: 2008-06-02 19:25:28


Hello,

I have a question: how to pass the location to generated target to other
target's build parameter?

My current case is an issue in C++/CLI compilation but it's not C++/CLI
specific question. Anyway, let's see an example. Say you have these two
files in C:\source:

[clr_lib.cpp]
public ref class CLRLib {
public:
    static void Hello() {
        System::Console::WriteLine("Hello World");
    }
};

[main.cpp]
#using <clr_lib.dll>
int main(){
    CLRLib::Hello();
}

I can compile them with the following command line:

1: cd C:\source
2: cl clr_lib.cpp /clr /LD
3: cl main.cpp /clr /AIC:\source

The /AI option in line 3 specifies the location of clr_lib.dll which is
generated by the line (2).

Now, I want to use bjam to compile it.

[Jamfile]
lib clr_lib : clr_lib.cpp
            : <cxxflags>-clr
              <asynch-exceptions>on
              <link>shared
;

exe main : main.cpp
         : <clr>clr
           <cxxflags>-AI[?]
;

How to find the value of [?] so that it takes the location of
clr_lib.dll?

Motonari Ito


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