Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to tell the linker where a libstdc++ and mingw32 live.
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2016-10-06 11:43:46


AMDG

On 10/05/2016 11:54 AM, Paul A. Bristow wrote:
> <snip>
> But I'm getting complaints (lots!) from the linker like this
>
> c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-ming
> w32/bin/ld.exe: skipping incompatible
> c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../libstdc++.a when
> searching for -lstdc++
>
>
> c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-ming
> w32/bin/ld.exe: skipping incompatible
> c:/mingw/bin/../lib/gcc/x86_64-w64-mingw32/6.1.0/../../../../x86_64-w64-ming
> w32/lib/libmingw32.a when searching for -lmingw32
>
> I'm use STL's package of minGW at c:\minGW and tried to tell bjam the
> folders where these .a files exist thus:
>
> using gcc
> : # version
> 6.1.0
> : # compiler exe location C:\Program Files\gcc-6-win64\bin\g++.exe
> #"C:\\Program Files\\gcc-6-win64\\bin\\g++.exe"
> "c:\\minGW\\bin\\g++.exe"
> : # options
> <library>"C:\MinGW\lib\"
> <library>"C:\MinGW\x86_64-w64-mingw32\lib"

I don't think <library> is an accepted option for
using gcc. It's certainly not listed here:
http://www.boost.org/build/doc/html/bbv2/reference/tools.html#bbv2.reference.tools.compiler.gcc
Also, '\' is an escape character.
You should probably use <linkflags> with -L.
I'm actually a bit surprised that MinGW doesn't handle
the paths automatically.

> <cxxflags>-Wnodeprecated-declarations
> # <cxxflags>"-std=c++11 -stdlib=libc++" <linkflags>"-stdlib=libc++""
> <compileflags>-m64 <linkflags>-m64
> ;
>
>

In Christ,
Steven Watanabe


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