boost-regex: how to compile with mingw?

I have never worked with boost or the regex libary but need it as a dependency for another project. I could compile the libary for Visual Studio 2005 (VS8), but the docs give not a single hint how to compile with mingw on Windows (here XP). I tried gcc an generic, but that does not work H:\boost_1_40_0\libs\regex\build>mingw32-make -fgcc.mak gcc.mak:37: "Building Boost.Regex without ICU / Unicode support:" gcc.mak:38: "Hint: set ICU_PATH on the nmake command line to point " gcc.mak:39: "to your ICU installation if you have one." mkdir -p gcc mkdir -p gcc/boost_regex-gcc-1_40 Syntaxfehler. mingw32-make: *** [gcc/boost_regex-gcc-1_40] Error 1 H:\boost_1_40_0\libs\regex\build>mingw32-make -fgeneric.mak mkdir -p generic Ein Unterverzeichnis oder eine Datei mit dem Namen "-p" existiert bereits. Folgender Fehler trat auf: -p. mingw32-make: *** [generic] Error 1 How should it be done? Matthias

AMDG Matthias Pospiech wrote:
I have never worked with boost or the regex libary but need it as a dependency for another project.
I could compile the libary for Visual Studio 2005 (VS8), but the docs give not a single hint how to compile with mingw on Windows (here XP).
I tried gcc an generic, but that does not work
H:\boost_1_40_0\libs\regex\build>mingw32-make -fgcc.mak gcc.mak:37: "Building Boost.Regex without ICU / Unicode support:" gcc.mak:38: "Hint: set ICU_PATH on the nmake command line to point " gcc.mak:39: "to your ICU installation if you have one." mkdir -p gcc mkdir -p gcc/boost_regex-gcc-1_40 Syntaxfehler. mingw32-make: *** [gcc/boost_regex-gcc-1_40] Error 1
H:\boost_1_40_0\libs\regex\build>mingw32-make -fgeneric.mak mkdir -p generic Ein Unterverzeichnis oder eine Datei mit dem Namen "-p" existiert bereits. Folgender Fehler trat auf: -p. mingw32-make: *** [generic] Error 1
How should it be done?
cd boost_1_40_0 bootstrap bjam toolset=gcc --with-regex In Christ, Steven Watanabe

Steven Watanabe schrieb:
How should it be done?
cd boost_1_40_0 bootstrap bjam toolset=gcc --with-regex Ok that worked, however it generates no dll, only a .lib file.
If I want a dll how would that work? And if I want to compile with Visual Studio (2005, 2008, or 2010) how would the comand be then? Matthias

AMDG Matthias Pospiech wrote:
Steven Watanabe schrieb:
How should it be done?
cd boost_1_40_0 bootstrap bjam toolset=gcc --with-regex Ok that worked, however it generates no dll, only a .lib file.
If I want a dll how would that work?
bjam toolset=gcc --with-regex link=shared
And if I want to compile with Visual Studio (2005, 2008, or 2010) how would the comand be then?
Change toolset=gcc to toolset=msvc-8.0, toolset=msvc-9.0, or toolset=msvc-10.0. You can also build with multiple toolsets at once. In Christ, Steven Watanabe

Steven Watanabe schrieb:
AMDG
Matthias Pospiech wrote:
Steven Watanabe schrieb:
How should it be done?
cd boost_1_40_0 bootstrap bjam toolset=gcc --with-regex Ok that worked, however it generates no dll, only a .lib file.
If I want a dll how would that work?
bjam toolset=gcc --with-regex link=shared
That generates a dll for Visual Studio, but with toolset=gcc it still only generates a static .lib file and no dll. Matthias

Matthias Pospiech wrote:
Steven Watanabe schrieb:
AMDG
Matthias Pospiech wrote:
Steven Watanabe schrieb:
How should it be done?
cd boost_1_40_0 bootstrap bjam toolset=gcc --with-regex Ok that worked, however it generates no dll, only a .lib file.
If I want a dll how would that work?
bjam toolset=gcc --with-regex link=shared
That generates a dll for Visual Studio, but with toolset=gcc it still only generates a static .lib file and no dll.
This is expected. Boost.Regex forces static build with mingw, because mingw has known bugs with a shared libraries. See: https://svn.boost.org/trac/boost/ticket/3430 for the onging investigation. - Volodya

If I want a dll how would that work?
bjam toolset=gcc --with-regex link=shared
That generates a dll for Visual Studio, but with toolset=gcc it still only generates a static .lib file and no dll.
With apologies for getting in late on this discussion: shared library builds with cygwin or mingw32 are deliberately disabled - in short they don't work with the regex lib :-( See https://svn.boost.org/trac/boost/ticket/3430 for a long-ish discussion on this... it's getting closer to being supported... maybe ! HTH, John.
participants (4)
-
John Maddock
-
Matthias Pospiech
-
Steven Watanabe
-
Vladimir Prus