<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt"><div><span></span></div><div style="display: block;" class="yahoo_quoted"> <br> <br> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 14pt;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Tuesday, October 15, 2013 2:25 PM, Conrad Bielski <conrad_bielski@yahoo.com> wrote:<br> </font> </div> <div class="y_msg_container"><div id="yiv6845166896"><div><div style="color:#000;background-color:#fff;font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt;">Thanks Dirk,<br clear="none">didn't realise that I could just run make! So now I have to see why the cmake doesn't
work in this case, thanks!<br clear="none">My output from make below.<br clear="none">Conrad :)<br clear="none"><br clear="none">tatas-MacBook-Pro:standard tata$ make rinside_sample2<br clear="none">llvm-g++-4.2 -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/include -I/Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside/include -mtune=core2 -g -O2 -Wall -I/usr/local/include rinside_sample2.cpp -F/Library/Frameworks/R.framework/.. -framework R -L/Library/Frameworks/R.framework/Resources/lib -lRblas -L/Library/Frameworks/R.framework/Resources/lib -lRlapack
/Library/Frameworks/R.framework/Versions/3.0/Resources/library/Rcpp/lib/libRcpp.a /Library/Frameworks/R.framework/Versions/3.0/Resources/library/RInside/lib/libRInside.a -o rinside_sample2<br clear="none"><br clear="none"><div><span><br clear="none"></span></div><div class="yiv6845166896yqt1443205868" id="yiv6845166896yqt20626"><div class="yiv6845166896yahoo_quoted" style="display:block;"> <br clear="none"> <br clear="none"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:14pt;"> <div style="font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt;"> <div dir="ltr"> <font face="Arial" size="2"> On Tuesday, October 15, 2013 1:33 PM, Dirk Eddelbuettel <edd@debian.org> wrote:<br clear="none"> </font> </div> <div class="yiv6845166896y_msg_container"><br clear="none">Conrad,<br clear="none"><br clear="none">On 15 October 2013 at 03:56, Conrad
Bielski wrote:<br clear="none">| I wanted to setup Rcpp development on my mac (osx 10.7.5) but I'm having<br clear="none">| trouble when compiling the RInside examples
(linking). I was able to get<br clear="none">| started quite easily on Ubuntu and I tried to use the same procedure on the<br clear="none">| mac. I hope that there is a simple solution to get going on the mac.<br clear="none">| <br clear="none">| Setup Procedure:<br clear="none">| 1. Downloaded the R binaries for OSX (R version 3.0.2 (2013-09-25) -- "Frisbee<br clear="none">| Sailing")<br clear="none">| 2. Installed Rcpp (0.10.5) and RInside (0.2.10)from within R (used<br clear="none">| install.packages(file_name_and_path, repos = NULL, type="source"))<br clear="none">| 3. ran CMake (2.8.12) on the RInside examples/standard in a separate build<br clear="none">| directory<br clear="none">| 4. ran make (compiler is Clang 4.0)<br clear="none"><br clear="none">It should also work without step 3. The CMake files are contributed and<br clear="none">optional; their focus is on help with certain IDEs with use CMake (and for<br clear="none">CMake itself).
But they may not have been tested as much on OS X.<br clear="none"><br clear="none">So go to examples/standard, and instead of 'make' (ie 'make all'), let's just<br clear="none">make one:<br clear="none"><br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:edd@max" target="_blank" href="mailto:edd@max">edd@max</a>:~/svn/rinside/pkg/inst/examples/standard$ rm rinside_sample0<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:edd@max" target="_blank" href="mailto:edd@max">edd@max</a>:~/svn/rinside/pkg/inst/examples/standard$ make rinside_sample0<br clear="none">ccache g++-4.7 -I/usr/share/R/include -I/usr/local/lib/R/site-library/Rcpp/include -I/usr/local/lib/R/site-library/RInside/include -g -O3 -Wall -pipe -Wno-unused -pedantic -Wall rinside_sample0.cpp -L/usr/lib/R/lib -lR -lblas -llapack -L/usr/local/lib/R/site-library/Rcpp/lib -lRcpp -Wl,-rpath,/usr/local/lib/R/site-library/Rcpp/lib
-L/usr/local/lib/R/site-library/RInside/lib -lRInside
-Wl,-rpath,/usr/local/lib/R/site-library/RInside/lib -o rinside_sample0<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:edd@max" target="_blank" href="mailto:edd@max">edd@max</a>:~/svn/rinside/pkg/inst/examples/standard$ ./rinside_sample0<br clear="none">Hello, world!<br clear="none"><a rel="nofollow" shape="rect" ymailto="mailto:edd@max" target="_blank" href="mailto:edd@max">edd@max</a>:~/svn/rinside/pkg/inst/examples/standard$ <br clear="none"><br clear="none">The exact linking statement will be system-dependent but you need to show us<br clear="none">yours. What you show below is a) 'too late' and b) lacking detail.<br clear="none"><br clear="none">Dirk<div class="yiv6845166896yqt7202751123" id="yiv6845166896yqtfd31196"><br clear="none"><br clear="none"> <br clear="none">| So the problem is that I get a linking problem and I'm not sure how to fix it.<br clear="none">| On Ubuntu, the linking was automatic so I'm a little lost how
to point to the<br clear="none">| required libraries.<br clear="none">| <br clear="none">| 33 warnings generated.<br clear="none">| Linking CXX executable rinside_callbacks0<br clear="none">| Undefined symbols for architecture x86_64:<br clear="none">| "RInside::RInside(int, char const* const*, bool, bool, bool)", referenced<br clear="none">| from:<br clear="none">| _main in rinside_callbacks0.cpp.o<br clear="none">| "RInside::~RInside()", referenced from:<br clear="none">| _main in rinside_callbacks0.cpp.o<br clear="none">| ld: symbol(s) not found for architecture x86_64<br clear="none">| clang: error: linker command failed with exit code 1 (use -v to see invocation)<br clear="none">| make[2]: *** [rinside_callbacks0] Error 1<br clear="none">| make[1]: *** [CMakeFiles/rinside_callbacks0.dir/all] Error 2<br clear="none">| make: *** [all] Error 2<br clear="none">| <br clear="none">| Thanks in
advance for your help,<br clear="none">| Conrad :)</div><br clear="none">| <br clear="none">| <br clear="none">| <br clear="none">| ----------------------------------------------------------------------<br clear="none">| _______________________________________________<br clear="none">| Rcpp-devel mailing list<br clear="none">| <a rel="nofollow" shape="rect" ymailto="mailto:Rcpp-devel@lists.r-forge.r-project.org" target="_blank" href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br clear="none">| <a rel="nofollow" shape="rect" target="_blank" href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a><br clear="none">-- <br clear="none">Dirk Eddelbuettel | <a rel="nofollow" shape="rect" ymailto="mailto:edd@debian.org" target="_blank" href="mailto:edd@debian.org">edd@debian.org</a> | <a rel="nofollow" shape="rect"
target="_blank" href="http://dirk.eddelbuettel.com/">http://dirk.eddelbuettel.com</a><div class="yiv6845166896yqt7202751123" id="yiv6845166896yqtfd67791"><br clear="none"></div><br clear="none"><br clear="none"></div> </div>
</div> </div></div> </div></div></div><br><br></div> </div> </div> </div> </div></body></html>