building boost::regex lib with mingw from gnu/linux
Hi, I would like to use the boost regex lib in a c++ program. This is being
developed under gnu/linux (Debian-Sarge Kernel 2.4.27) with gcc 3.3.5.
Also, we are creating binaries for Win32 by cross compiling with MinGW
(i586-mingw32msvc-g++ (GCC) 3.4.2 (mingw-special)).
Thus, i have to build the boost::regex library for both gnu/linux and win32.
There was no problem to get the linux version (it is included in Debian, and
anyway the source succeded to compile), but i'm having trouble to compile
the win version.
I compile from
Hi, I would like to use the boost regex lib in a c++ program. This is being developed under gnu/linux (Debian-Sarge Kernel 2.4.27) with gcc 3.3.5. Also, we are creating binaries for Win32 by cross compiling with MinGW (i586-mingw32msvc-g++ (GCC) 3.4.2 (mingw-special)).
Thus, i have to build the boost::regex library for both gnu/linux and win32. There was no problem to get the linux version (it is included in Debian, and anyway the source succeded to compile), but i'm having trouble to compile the win version.
I compile from
/boost_1_31_0/libs/regex/build by using generic.mak (make -f generic.mak). in this file i've just added these lines: CXX=i586-mingw32msvc-g++ LINKER=i586-mingw32msvc-ar This is the output i obtain:
xxxxx@xxxxx:~/boost/boost_1_31_0/libs/regex/build$ make -f generic.mak i586-mingw32msvc-g++ -o generic/boost_regex/c_regex_traits.o -c -O2 -I../../../ ../src/c_regex_traits.cpp ../src/c_regex_traits.cpp: In static member function `static size_t boost::c_regex_traitsboost::regex_wchar_type::strnarrow(char*, size_t, const boost::regex_wchar_type*)': ../src/c_regex_traits.cpp:1052: error: `wcstombs' is not a member of `std' make: *** [generic/boost_regex/c_regex_traits.o] Error 1
any clues about what i'm doing wrong?
Looks like a configuration issue: can you try compiling and *running* the
program libs/config/test/config_info.cpp, in the output at the end you
should see:
BOOST_USER_CONFIG =
I had lots of trouble compiling boost from mingw/linux. Instead, lower yourself to windows for an hour or so and compile with mingw/win32. Then use the libraries you have compiled under linux. Your problem below stems from the fact that mingw does not currently support wide characters. There is probably a #define-guard that isn't properly set because you are compiling from linux, and its probably picking up the gcc capabilities from native-gcc, not mingw-gcc. atoral@dlsi.ua.es wrote:
Hi, I would like to use the boost regex lib in a c++ program. This is being developed under gnu/linux (Debian-Sarge Kernel 2.4.27) with gcc 3.3.5. Also, we are creating binaries for Win32 by cross compiling with MinGW (i586-mingw32msvc-g++ (GCC) 3.4.2 (mingw-special)).
Thus, i have to build the boost::regex library for both gnu/linux and win32. There was no problem to get the linux version (it is included in Debian, and anyway the source succeded to compile), but i'm having trouble to compile the win version.
I compile from
/boost_1_31_0/libs/regex/build by using generic.mak (make -f generic.mak). in this file i've just added these lines: CXX=i586-mingw32msvc-g++ LINKER=i586-mingw32msvc-ar This is the output i obtain:
xxxxx@xxxxx:~/boost/boost_1_31_0/libs/regex/build$ make -f generic.mak i586-mingw32msvc-g++ -o generic/boost_regex/c_regex_traits.o -c -O2 -I../../../ ../src/c_regex_traits.cpp ../src/c_regex_traits.cpp: In static member function `static size_t boost::c_regex_traitsboost::regex_wchar_type::strnarrow(char*, size_t, const boost::regex_wchar_type*)': ../src/c_regex_traits.cpp:1052: error: `wcstombs' is not a member of `std' make: *** [generic/boost_regex/c_regex_traits.o] Error 1
any clues about what i'm doing wrong?
thanks _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
participants (3)
-
atoral@dlsi.ua.es
-
John Maddock
-
Paul