On Tuesday, October 15, 2013 2:25 PM, Conrad Bielski <conrad_biel...@yahoo.com>
wrote:
Thanks Dirk,
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!
My output from make below.
Conrad :)
tatas-MacBook-Pro:standard tata$ make rinside_sample2
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
On Tuesday, October 15, 2013 1:33 PM, Dirk Eddelbuettel <e...@debian.org> wrote:
Conrad,
On 15 October 2013 at 03:56, Conrad Bielski wrote:
| I wanted to setup Rcpp development on my mac (osx 10.7.5) but I'm having
| trouble when compiling the RInside examples
(linking). I was able to get
| started quite easily on Ubuntu and I tried to use the same procedure on the
| mac. I hope that there is a simple solution to get going on the mac.
|
| Setup Procedure:
| 1. Downloaded the R binaries for OSX (R version 3.0.2 (2013-09-25) -- "Frisbee
| Sailing")
| 2. Installed Rcpp (0.10.5) and RInside (0.2.10)from within R (used
| install.packages(file_name_and_path, repos = NULL, type="source"))
| 3. ran CMake (2.8.12) on the RInside examples/standard in a separate build
| directory
| 4. ran make (compiler is Clang 4.0)
It should also work without step 3. The CMake files are contributed and
optional; their focus is on help with certain IDEs with use CMake (and for
CMake itself).
But they may not have been tested as much on OS X.
So go to examples/standard, and instead of 'make' (ie 'make all'), let's just
make one:
edd@max:~/svn/rinside/pkg/inst/examples/standard$ rm rinside_sample0
edd@max:~/svn/rinside/pkg/inst/examples/standard$ make rinside_sample0
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
edd@max:~/svn/rinside/pkg/inst/examples/standard$ ./rinside_sample0
Hello, world!
edd@max:~/svn/rinside/pkg/inst/examples/standard$
The exact linking statement will be system-dependent but you need to show us
yours. What you show below is a) 'too late' and b) lacking detail.
Dirk
| So the problem is that I get a linking problem and I'm not sure how to fix it.
| On Ubuntu, the linking was automatic so I'm a little lost how to point to the
| required libraries.
|
| 33 warnings generated.
| Linking CXX executable rinside_callbacks0
| Undefined symbols for architecture x86_64:
| "RInside::RInside(int, char const* const*, bool, bool, bool)", referenced
| from:
| _main in rinside_callbacks0.cpp.o
| "RInside::~RInside()", referenced from:
| _main in rinside_callbacks0.cpp.o
| ld: symbol(s) not found for architecture x86_64
| clang: error: linker command failed with exit code 1 (use -v to see
invocation)
| make[2]: *** [rinside_callbacks0] Error 1
| make[1]: *** [CMakeFiles/rinside_callbacks0.dir/all] Error 2
| make: *** [all] Error 2
|
| Thanks in advance for your help,
| Conrad :)
|
|
|
| ----------------------------------------------------------------------
| _______________________________________________
| Rcpp-devel mailing list
| Rcpp-devel@lists.r-forge.r-project.org
| https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel
--
Dirk Eddelbuettel | e...@debian.org | http://dirk.eddelbuettel.com
_______________________________________________
Rcpp-devel mailing list
Rcpp-devel@lists.r-forge.r-project.org
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel