Boost::Xpressive компиляция под MinGW
Переход на GCC в первый раз, и меня немного смущает то, что компилятор говорит мне здесь. По сути, он ведет себя так, как boost::xpressive::wsregex не определен (я считаю).
Вот соответствующий код:
#include "criterion.h"
#include <string>
#include <boost/xpressive/xpressive.hpp>
//More lines of code omitted here
class perlRegex : public regexClass
{
private:
std::wstring regexString;
boost::xpressive::wsregex regex; // This is the line complained about
public:
unsigned __int32 getPriorityClass() const;
BOOL include(fileData &file) const;
unsigned int directoryCheck(const std::wstring& /*directory*/) const;
std::wstring debugTree() const;
perlRegex(const std::wstring& inRegex);
};
А вот и ошибка:
regex.h:46: error: using-declaration for non-member at class scope
regex.h:46: error: expected `;' before "regex"
Что меня смущает, так это то, что я объявляю участника, но жалуется, что использую члена где-то еще.
Я забыл #include
что-то?
Заранее спасибо, Billy3
1 ответ
cygwin и mingw не поддерживают широкие символы, поэтому xpressive также не может. Смотрите следующее из xpressive_fwd.hpp:
#if defined(BOOST_NO_CWCHAR) | \
defined(BOOST_NO_CWCTYPE) | \
defined(BOOST_NO_STD_WSTRING)
# ifndef BOOST_XPRESSIVE_NO_WREGEX
# define BOOST_XPRESSIVE_NO_WREGEX
# endif
#endif
Макросы BOOST_NO_CWCHAR, BOOST_NO_CWCTYPE и BOOST_NO_STD_WSTRING автоматически определяются заголовком boost.hpp для вашей платформы platcorm/compiler/std-library. Сожалею.
В будущем вы получите лучшие результаты, разместив дополнительные вопросы в списке активных пользователей.
- Эрик Ниблер BoostPro Computing www.boostpro.com