I just added one function definition to a .h file and its implementation in its corresponding .cpp file. When I compiled it, I got this compiling error:
./query.so: undefined reference to `Recognizer::skip_one_char(std::string const&, std::string const&)'
collect2: error: ld returned 1 exit status
In Recognizer.h, I added this:
bool skip_one_char(const string &content, const string &tag);
And in Recognizer.cpp, I added this:
bool skip_one_char(const string &content, const string &tag){
...
return false
}
It seems everything is right, but why do I still this error:
undefined reference
Also, before I added this additional function implementation to it, the package compiles and runs well.