Hi,<br><br>I created a package using Rcpp (using Rcpp.package.skeleton()).<br>Now I need to access a piece of R code from the cpp code in the package.<br>I am trying to use RInside.<br><br>I am using Mac 64 bit machine.<br>



<br>When I installed RInside I found the shared libraries in two places<br>1. /Library/Frameworks/R.<div id=":5r">framework/Versions/2.14/Resources/library/RInside/lib<br>and  in <br>2. /Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/libs<br>



<br>in the first directory I have one subfolder named i386 that contains two files<br>libRInside.a        libRInside.dylib<br><br>but in the second directory I have three subfolders namely , <br>a)  i386 with files libRInside.a        libRInside.dylib<br>



b) x86_64 with files RInside.so    RInside.so.dSYM<br>c)ppc with files RInside.so    RInside.so.dSYM<br><br><br>In my DESCRIPTION file I addedd<br> LinkingTo: Rcpp, RInside<br>In my MakeVars I added <br>PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"` `$(R_HOME)/bin/Rscript -e "RInside:::LdFlags()"` <br>


<br>Now when I install the package using R CMD install , it installs both 32 bit and 64 bit version.<br>However,
 I am getting error for the 64 bit version , probably because RInside.so
 is not for mac ? (Please see below the outputs).<br>
<br>By the way how can I modify architecture specific compile option in 
Makevars file for (for example I want to pass different libraries to 
different versions directed fro 32 or 64 bit architectures ) ?<br><br>Output from R CMD install pkg<br>
----------------------------<br><br>* installing to library ‘/Library/Frameworks/R.framework/Versions/2.14/Resources/library’<br>* installing *source* package ‘flowMatch’ ...<br>** libs<br>*** arch - i386<br>g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c BipartiteGraph.cpp -o BipartiteGraph.o<br>


BipartiteGraph.cpp:28: warning: division by zero in ‘1.0e+0 / 0.’<br>g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c MinWghtEdgCoverBipartite.cpp -o MinWghtEdgCoverBipartite.o<br>


g++ -arch i386 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o<br>


g++ -arch i386 -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/lib -o flowMatch.so BipartiteGraph.o 
MinWghtEdgCoverBipartite.o rcpp_hello_world.o /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/lib/i386/libRcpp.a /Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/lib/i386/libRInside.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation<br>


installing to /Library/Frameworks/R.framework/Versions/2.14/Resources/library/flowMatch/libs/i386<br>*** arch - x86_64<br>g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c BipartiteGraph.cpp -o BipartiteGraph.o<br>


BipartiteGraph.cpp:28: warning: division by zero in ‘1.0e+0 / 0.’<br>g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c MinWghtEdgCoverBipartite.cpp -o MinWghtEdgCoverBipartite.o<br>


g++ -arch x86_64 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/x86_64  -I/usr/local/include -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/2.14/Resources/library/RInside/include"   -fPIC  -g -O2 -c rcpp_hello_world.cpp -o rcpp_hello_world.o<br>


<b>g++ -arch x86_64 -dynamiclib -Wl,-headerpad_max_install_names 
-undefined dynamic_lookup -single_module -multiply_defined suppress 
-L/usr/local/lib -o flowMatch.so BipartiteGraph.o 
MinWghtEdgCoverBipartite.o rcpp_hello_world.o /Library/Frameworks/R.framework/Versions/2.14/Resources/library/Rcpp/lib/x86_64/libRcpp.a /libRInside.a -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation</b><br>


i686-apple-darwin11-llvm-g++-4.2: /libRInside.a: No such file or directory<br>make: *** [flowMatch.so] Error 1<br>ERROR: compilation failed for package ‘flowMatch’<br><br><br>-------------<br><br><br>thanks <br><font color="#888888"><br>

-- Ariful</font></div>