<span style="font-family: Arial; font-size: 13px;"><font size="2">Hi,</font><div><font size="2"><br></font></div><div><font size="2">I am having trouble getting Rcpp to compile c++ files including headers from the gretl statistical libraries </font></div><div><font size="2"><br></font></div><div><font size="2">for instance, here are the first lines of a test cpp file I have been trying to compile: </font></div><div><font size="2"><br></font></div><div><font size="2"><div>#include <Rcpp.h></div><div><br></div><div>extern "C" {</div><div>#include <gretl/libgretl.h></div><div>#include <gretl/kalman.h></div><div>}</div><div><br></div></font></div><div><span style="font-size: small; ">now, here is the result of a make command in linux (debian), with the error messages focussing on the lines of code where the #include are located:</span></div><div><font size="2"><br></font></div><div><div><font size="2">jean@desktop:~/Documents/code experiments/gretl$ make</font></div><div><font size="2"><br></font></div><div><font size="2">PKG_CPPFLAGS="-I/usr/share/R/include -I/usr/lib/R/library/Rcpp/include -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include  " PKG_LIBS="-L/usr/lib64/R/lib -lR -L/usr/lib/R/library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/lib/R/library/Rcpp/lib -fopenmp -lgretl-1.0 -lxml2 -lfftw3 -lm -lglib-2.0  " R CMD SHLIB test2.cpp</font></div><div><font size="2"><br></font></div><div><font size="2">make[1]: Entering directory `/home/jean/Documents/code experiments/gretl'</font></div><div><font size="2"><br></font></div><div><font size="2">g++ -I/usr/share/R/include -DNDEBUG -I/usr/share/R/include -I/usr/lib/R/library/Rcpp/include -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include       -fpic  -O3 -pipe  -g  -c test2.cpp -o test2.o</font></div><div><font size="2"><br></font></div><div><font size="2">In file included from /usr/include/gretl/libgretl.h:384,</font></div><div><font size="2">                 from test2.cpp:4:</font></div><div><font size="2">/usr/include/gretl/genmain.h:33: error: expected identifier before numeric constant</font></div><div><font size="2">/usr/include/gretl/genmain.h:33: error: expected ‘}’ before numeric constant</font></div><div><font size="2">/usr/include/gretl/genmain.h:33: error: expected unqualified-id before numeric constant</font></div><div><font size="2">/usr/include/gretl/genmain.h:49: error: expected constructor, destructor, or type conversion before ‘;’ token</font></div><div><font size="2">/usr/include/gretl/genmain.h:59: error: ‘R_MAX’ was not declared in this scope</font></div><div><font size="2">test2.cpp:6: error: expected declaration before ‘}’ token</font></div><div><font size="2">make[1]: *** [test2.o] Error 1</font></div><div><font size="2">make[1]: Leaving directory `/home/jean/Documents/code experiments/gretl'</font></div><div><font size="2">make: *** [test2.o] Error 1</font></div></div><div><br></div><div>any guidance would be really appreciated!</div><div><br></div><div>many thanks,</div><div>jean</div></span>