Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-07-01 09:30:24


Hi Kirill,

> I have a need to link .a library with msvc, however boost.build silently
> replaces library extension to .lib. It's an external precompiled library
> explicetly configured with <name>yaddada/foobar.a, I am running windows
> verion of bjam with M4 boost.build.
>
> It is not very common use case, but it is not as rare as one might
> assume. For instance those who use boost.ublas might want to take
> advantage of ublas bindings to use ATLAS and Lapack routines on ublas
> matrices. The typical usage of ATLAS on windows is to compile it with
> gcc and link resulting atlas.a file to msvc compiled code.
>
> I tried to find offending jam code but did not have much luck. It's
> quite hard to grep for 'lib' or 'a'. There are couple of places wich
> look suspicios:
>
> new/builtin.jam:
> "$(LIBRARY_OPTION)$(FINDLIBS_ST:S=.lib)"
> new/builtin.jam:
> "$(LIBRARY_OPTION)$(FINDLIBS_SA:S=.lib)"
> tools/msvc.jam: $(.LD) $(LINKFLAGS) /out:"$(<[1]:W)"
> $(.implib)"$(<[2]:W)" /LIBPATH:"$(LINKPATH:W
> )" "$(FINDLIBS:S=.lib)" $(USER_LINKFLAGS) @"$(>:W)"
>
> but removing extension substitution in there did not help. Could someone
> shed some light on it, please?

I would say that the first two places are to blame. They should add "lib" only
if no suffix is given, but they add it unconditionally. I've reproduced the
problem and hope to fix this tomorrow.

- Volodya

 


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