I am using C library antlr3c. I installed the library using: sudo apt-get install libantlr3c-dev
#include "antlr3defs.h"
..
string DBparser::sparqlParser(const string& _sparql, SPARQLquery& _sparql_query)
{
pANTLR3_INPUT_STREAM input;
pSparqlLexer lex;
pANTLR3_COMMON_TOKEN_STREAM tokens;
pSparqlParser parser;
input = antlr3StringStreamNew((ANTLR3_UINT8 *)(_sparql.c_str()),ANTLR3_ENC_UTF8,_sparql.length(),(ANTLR3_UINT8 *)"QueryString");
}
When I run the program containing the above fragment I get the error: NetBeansProjects/gstore/Parser/DBparser.cpp:25: undefined reference to `antlr3StringStreamNew'
I am not getting how to resolve this error as antlr3StringStreamNew is indeed declared in antlr3defs.h. Although I am unable to find its definition.
If this related to incompatibility with version 3.4 of antlr3c (as I have installed version 3.2). If this is indeed the case then, is there any alternate function in antlr3c version 3.4 by which I may achieve the same functionality.