|
Boost : |
Subject: Re: [boost] RE building boost (regex) in mingw
From: Lorenzo Bettini (bettini_at_[hidden])
Date: 2008-12-17 03:31:21
frederic.bron_at_[hidden] wrote:
>
> boost-bounces_at_[hidden] a écrit sur 16/12/2008 22:42:16 :
>
>> frederic.bron_at_[hidden] wrote:
>>> boost-bounces_at_[hidden] a écrit sur 15/12/2008 23:39:01 :
>>>
>>>> frederic.bron_at_[hidden] wrote:
>>>>> I have no problem building regex with mingw provided by cygwin
>>>> (g++ with option -mno-cygwin). If you are interested this way, I can help.
>>>>> Regards,
>>>>>
>>>> Actually, I already have cygwin (and always used boost with that without
>>>> any problem); so I should build boost regex for mingw using cygwin?
>>>>
>>>> any help is more than welcome :-)
>>> OK, this what I do to build 1.37.0 for win32 from cygwin:
>>>
>>> $ ./configure --with-libraries=regex --prefix=/cygdrive/d/Softs/boost_msw
>>> This builds bjam and write a default user-config.jam and Makefile
>> that you have to change like this:
>>> BJAM_CONFIG=-d2 -j2 -sNO_BZIP2=1 -sNO_ZLIB=1 link=static
>> threading=multi runtime-link=shared threadapi=win32 --layout=system
>>> LIBS=--with-regex release
>>>
>>> in user-config.jam replace "using gcc ;" by: "using gcc : : :
>> <compileflags>-DBOOST_WINDOWS_API <compileflags>-mno-cygwin
>> <linkflags>-mno-cygwin ;"
>>> You can then build boost with
>>> $ make install >& install.log
>>>
>>>
>>> This will build regex and install the headers. Headers and .a will
>> be in /cygdrive/d/Softs/boost_msw which you can adapt to your needs.
>>> I you also want dynamic labraries, you can just remove link=static (?).
>> mhh... the compilation and installation seemed to work fine... but I
>> can't seem to use it from the msys shell: it does not see any header,
>> and it keeps on seeing as /usr just / ... probably msys installation is
>> messed up with mingw? I have no past experience with mingw (and when I
>> port programs on windows I've always used cygwin)...
>
>
> What does not work? I do the compilation like this for a collegue who then compile using CodeBlocks+included mingw so I think building boost from cygwin and using it with mingw works. Did you give all
> paths (windows paths) to mingw?
It then worked when I compiled regex library as static... building it as
dynamic produces a dll which g++ is not able to link with (it doesn't
find the regex functions).
The problem with /usr was actually due to the way msys handles that
special directory (as I saw in the documentation).
Just for curiosity: do you use the msys shell or do you use the dos
command prompt to perform the compilation of your programs with mingw?
Because now there seems to be a problem about the way msys shell handles
command line arguments:
--title="My title"
is interpreted as
--title=My title
which is wrong
thanks
Lorenzo
-- Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino ICQ# lbetto, 16080134 (GNU/Linux User # 158233) HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com http://www.myspace.com/supertrouperabba BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com http://www.gnu.org/software/src-highlite http://www.gnu.org/software/gengetopt http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk