I'm having a problem using the Boost library in Dev C++, specifically the regex one. I've tried using their example code:
#include string #include iostream using namespace boost; regex expression("([0-9]+)(\\-| |$)(.*)"); // process_ftp: // on success returns the ftp response code, and fills // msg with the ftp response message. int process_ftp(const char* response, std::string* msg) { cmatch what; if(regex_match(response, what, expression)) { // what[0] contains the whole string // what[1] contains the response code // what[2] contains the separator character // what[3] contains the text message. if(msg) msg->assign(what[3].first, what[3].second); return std::atoi(what[1].first); } // failure did not match if(msg) msg->erase(); return -1; }
The error it's throwing me is:
[Linker error] undefined reference to `boost::re_detail::get_mem_block()'
Along with many others linker errors. I can't seem to find the way to fix it, even when searching for this problem I've come across other compilers. I've already added the include paths to the project for the other header files.
How I'm supposed to get around it? And if I have to change something on the way DevC++ compiles is from the Files tab or the Parameters one? And also, on not a way-too-diferent side note, can someone recommend me a good guide or page about Compilers and/or something that could help me? (since I couldn't find much in the c++ page).
Thanks.
;)
. – rubenvb