I have developed a C++ class which reads in a text file and store some information in provate variables. To parse the file, I use regex library. During compilation there is an error I can't understand. First I make a shared object library for my class. Afterwards I try to compile the test program. Here the error occurs: undefined reference to std::regex_iterator...
I do the compilation with the following commands on a unix machine:
g++ -c -fpic -m64 -std=c++11 Foo.h Foo.cpp
g++ -shared -m64 -std=c++11 -o libFoo.so Foo.o
g++ -m64 -std=c++11 -I. -L. -lFoo -o camelTest Foo.h main.cpp
To reproduce the error, here is a small example: example
Thanks in advance for your help