From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-07-01 09:30:24
> 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:
> tools/msvc.jam: $(.LD) $(LINKFLAGS) /out:"$(<:W)"
> $(.implib)"$(<: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.
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