Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2003-12-02 10:02:48


"Matthieu P." <matt_at_[hidden]> writes:

> Hello,
>
> I am using bjam on msvc [not my choice] on a foobar project:
>
> foo:
> +- Jamfile
> | Jamrules
> | foo.cpp
> +- bar
> +- Jamfile
> bar.cpp
> bar.h
>
> --------------------------
> Jamfile in bar is:
>
> subproject bar;
>
> dll bar : bar.cpp
> : <include>bar.h
> : debug ;
> __________________________
>
> Jamfile in foo is:
>
> project-root ;
>
> subinclude bar ;
>
> exe foo : foo.cpp <dll>bar/bar
> :
> : debug ;
> --------------------------
>
> Upon building this project (bjam -sTOOLS=msvc foo), bjam stops at the
> linking stage, saying he can't find bar.lib.

Probably because there are no exported symbols in bar.dll. Take a
look in the microsoft documentation for __declspec(dllimport) and
__declspec(dllexport).

> bjam did built bar.dll correctly though, so I don't know why he
> still expects a .lib file.

Because, unless you are planning to use a .def file, linking to a DLL
on Windows uses a companion import library (.lib) file. Again, see
the microsft docs on dynamic linking.

> I tried to modify the line in allyourbase.jam about SUFDLL under the NT
> section from '.dll .lib' to just '.dll', but it didn't work.

Yeah, don't do that; it'll break everything.

HTH,

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com
 

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