1
votes

I am running R3.1 on Kubuntu 14.04 and using Codeblocks as an IDE for trying an RInside program from Dirk Eddelbuettels eg:

http://dirk.eddelbuettel.com/blog/2011/03/25/#rinside_and_qt `

// Copyright (C) 2010 Dirk Eddelbuettel and Romain Francois
//
// GPL'ed
#include <RInside.h>                    // for the embedded R via RInside
int main(int argc, char *argv[]) {
    RInside R(argc, argv);           // create an embedded R instance

    R["txt"] = "Hello, world!\n";   // assign a char* (string) to 'txt'

    R.parseEvalQ("cat(txt)");    // eval the init string, ignoring any returns

    exit(0);
}

`

and i get the following error:

/usr/bin/ld: obj/Debug/main.o||undefined reference to symbol 'REprintf'|

and I don't know what library is missing. Anyone know?

Thanks

1
The error implies that you aren't linking against libR.Kevin Ushey

1 Answers

1
votes

That is the environment I develop on (apart from the difference that I am now on 15.05) which is almost certain to work -- but you got an error indicating that you did not link against libR.

That is almost surely due to you not doing what the README suggests ie for the dozen+ examples in directory examples/standard/ do

make                 # compile and link all 
./rinside_sample0    # run the first 

If you insist on using an IDE you can use the contributed cmake/ directory. But the code is tested and released with for use with the (GNU)makefile.