Bonjour,

Voila, j'ai un problème avec la librairie regex de boost, un code comme ceci :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
#include <boost/regex.hpp>
#include <iostream> 
using namespace std;
using namespace boost;
 
int main(int argc, char* argv[])
{
  regex reg("regex");
  return 0;
}
Me renvois cette erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
/tmp/ccr6d67w.o: In function `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)':
test.cpp:(.text._ZN5boost11basic_regexIcNS_12regex_traitsIcNS_16cpp_regex_traitsIcEEEEE6assignEPKcS7_j[boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::assign(char const*, char const*, unsigned int)]+0x27): undefined reference to `boost::basic_regex<char, boost::regex_traits<char, boost::cpp_regex_traits<char> > >::do_assign(char const*, char const*, unsigned int)'
collect2: ld returned 1 exit status
Quelqu'un aurais une solution ?
Merci