처음으로 GCC로 전환하면 컴파일러에서 내게 말하는 내용에 다소 혼란스러워집니다. 본질적으로, 그것은 boost :: xpressive :: wsregex가 정의되지 않은 것처럼 행동합니다 (저는 믿습니다). 여기 Boost :: Xpressive MinGW에서 퍼즐 컴파일
는 관련 코드 :#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
내가 regexClass의 정의가 criterion.h 또는 생략 앞의 코드에 하나있을 것 같은데요? –
예, criterion.h에'#define'd가 있습니다. –
헤더 검색 경로가 올바른지, 즉 부스트 라이브러리가 소스에 제대로 포함되어 있는지 확인할 수 있습니까? – dirkgently