regex linking problems- no copy constructor or op= for basic_regex<char> ?

i've been using the regex library fine to match patterns, but when i changed my objects so the regex object is stored instead of initialised each time, i get linking problems. basically it was working fine as: (simplified code): bool myclass::myfunction(char* testString) { regex mypattern("abcd"); cmatch result; return regex_match(testString, result, mypattern); } but when i changed it to store the mypattern object it came up with linker problems: class myclass { ... regex _mypattern; } void myclass::myclass() { _mypattern = regex("abcd"); } bool myfunction(char* testString) { cmatch result; return regex_match(testString, result, _mypattern); } the complaint seems to be about the copy constructor and op= methods, which are supposedly implemented in the boost_regex library. i'm linking using -lboost_regex-mgw (with the library path defined in LIBRARY_PATH); Anthony

the complaint seems to be about the copy constructor and op= methods, which are supposedly implemented in the boost_regex library. i'm linking using -lboost_regex-mgw (with the library path defined in LIBRARY_PATH);
I'm guessing that the compiler hasn't instantiated versions of these in the library when building in release mode, what happens if you link to the debug version of the regex library (with -lboost_regex-mgw-d). John.
participants (2)
-
Anthony Knittel
-
John Maddock