<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>I am trying to get RInside to run on my mac (Mavericks). (I was able to get RInline running no problem using Ubuntu at work; "it just worked" with none of the hassle outlined below).<div><br></div><div>I downloaded the package and tried to run:</div><div><br></div><div>"make rinside_sample0" from within the standard folder of RInline.</div><div><br></div><div>This produced Error1. </div><div> </div><div><i>Among the first few lines of the many errors, I got:</i></div><div>
<p class="p1"><i>/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside/include/RInsideCommon.h:34:18: error: string: No such file or directory</i></p>
<p class="p1"><i>/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside/include/RInsideCommon.h:35:18: error: vector: No such file or directory</i></p>
<p class="p1"><i>/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside/include/RInsideCommon.h:36:20: error: iostream: No such file or directory</i></p><p class="p1"><br></p><p class="p1"><br></p><p class="p1">Why does the make file not find the "base" <span style="font-size: 12pt;">headers for </span><span style="font-size: 12pt;">iostream, string, vector from C++? I am guessing I need to tell the compiler where to find these files? How would I do this, presumably from editing the make file? Are there any guides for how to do this etc? Unfortunately, with no background in working with compilers when errors pop up, I wouldn't know where to start at this point.</span></p><div><br></div><div>I found this post suggesting I need to compile RInside from source on the mac.</div><div><a href="http://stackoverflow.com/questions/12684408/rinside-linking-on-mac-osx" target="_blank">http://stackoverflow.com/questions/12684408/rinside-linking-on-mac-osx</a></div><div><br></div><div>I then tried compiling RInside from source, but got these errors:</div><div><br></div><div>
<p class="p1"><i>* installing to library ‘/Library/Frameworks/R.framework/Versions/3.0/Resources/library’</i></p>
<p class="p1"><i>* installing *source* package ‘RInside’ ...</i></p>
<p class="p1"><i>** package ‘RInside’ successfully unpacked and MD5 sums checked</i></p>
<p class="p1"><i>** libs</i></p>
<p class="p1"><i>/Library/Frameworks/R.framework/Resources/bin/Rscript tools/RInsideAutoloads.r > RInsideAutoloads.h</i></p>
<p class="p1"><i>/Library/Frameworks/R.framework/Resources/bin/Rscript tools/RInsideEnvVars.r > RInsideEnvVars.h</i></p>
<p class="p1"><i>llvm-g++-4.2 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -DNDEBUG -I. -I../inst/include/ -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include" -fPIC -mtune=core2 -g -O2 -c MemBuf.cpp -o MemBuf.o</i></p>
<p class="p1"><i>MemBuf.cpp:23:20: error: iostream: No such file or directory</i></p>
<p class="p1"><i>MemBuf.cpp:24:19: error: cstdlib: No such file or directory</i></p>
<p class="p1"><i>MemBuf.cpp:25:18: error: string: No such file or directory</i></p>
<p class="p1"><i>In file included from MemBuf.cpp:27:</i></p>
<p class="p1"><i>../inst/include/MemBuf.h:25: error: ‘string’ in namespace ‘std’ does not name a type</i></p>
<p class="p1"><i>../inst/include/MemBuf.h:32: error: expected unqualified-id before ‘&’ token</i></p>
<p class="p1"><i>../inst/include/MemBuf.h:32: error: expected ‘,’ or ‘...’ before ‘&’ token</i></p>
<p class="p1"><i>../inst/include/MemBuf.h: In member function ‘const char* MemBuf::getBufPtr()’:</i></p>
<p class="p1"><i>../inst/include/MemBuf.h:33: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp: In constructor ‘MemBuf::MemBuf(int)’:</i></p>
<p class="p1"><i>MemBuf.cpp:34: error: class ‘MemBuf’ does not have any field named ‘buffer’</i></p>
<p class="p1"><i>MemBuf.cpp:35: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp: In member function ‘void MemBuf::resize()’:</i></p>
<p class="p1"><i>MemBuf.cpp:39: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp: In member function ‘void MemBuf::rewind()’:</i></p>
<p class="p1"><i>MemBuf.cpp:43: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp: At global scope:</i></p>
<p class="p1"><i>MemBuf.cpp:46: error: expected unqualified-id before ‘&’ token</i></p>
<p class="p1"><i>MemBuf.cpp:46: error: expected ‘,’ or ‘...’ before ‘&’ token</i></p>
<p class="p1"><i>MemBuf.cpp: In member function ‘void MemBuf::add()’:</i></p>
<p class="p1"><i>MemBuf.cpp:47: error: ‘buf’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp:48: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>MemBuf.cpp:51: error: ‘buffer’ was not declared in this scope</i></p>
<p class="p1"><i>make: *** [MemBuf.o] Error 1</i></p>
<p class="p1"><i>ERROR: compilation failed for package ‘RInside’</i></p></div><div><br></div><div>Again, something about iostream missing etc. </div><div> </div><div>Any advice on the steps for what I need to do to fix this problem would be much appreciated.</div></div><div><br></div><div>Thanks in advance</div><div>Clay</div> </div></body>
</html>