Hello,
i am new to c++ coding and for practicing i want to rewrite some of my old
perl scripts that use regular expressions in c++. So i installed libboost
for regex version 1.34.1 on my workstation (using a kubuntu package).
Unfortunatley even the most simple program i can think of does not want to
compile:
#include <iostream>
#include <cstdlib>
#include
using namespace boost;
using namespace std;
int main(int argc, char *argv[])
{
boost::regex(".*");
cout << "test\n";
return 0;
}
...giving me:
[...]
testapp.o: In function `boost::basic_regex >::assign(char const*, char const*, unsigned
int)':
/usr/include/boost/regex/v4/basic_regex.hpp:255: undefined reference to
`boost::basic_regex >::do_assign(char const*, char const*,
unsigned int)'
collect2: ld returned 1 exit status
[...]
Anyhow if i am doing
int main(int argc, char *argv[])
{
boost::regex();
cout << "test\n";
return 0;
}
withouth passing a regex condition it compiles successful...Yes i know this
short programm does not give any meaningful functionality but i just want to
demonstrate that the intialization of the basic_regex fails on my machine.
Do i have problem with my libboost installation or just a simple syntax error
here?
regards
Jan