Re: [Rd] Problem with compiling shared C/C++ library for loading into R (Linux)

2009-01-14 Thread Samsiddhi Bhattacharjee
Thanks. I figured out the problem finally. The first error I mentioned was solved by compiling the external library blitz++ using the configure option --with-pic (or compiler flag -fPIC). It has something to do with position indepent code and global variables, which I frankly don't understand. M

Re: [Rd] Problem with compiling shared C/C++ library for loading into R (Linux)

2009-01-11 Thread torpedo fisken
I think you're not linking it together when you call R CMD SHLIB, use something like R CMD SHLIB mylib.c yourlib1.o yourlib2.o Otherwise mail again with your Makefile, or all the commands you are using good luck 2009/1/11 Samsiddhi Bhattacharjee : > Dear all, > > I am using the .Call interface

[Rd] Problem with compiling shared C/C++ library for loading into R (Linux)

2009-01-10 Thread Samsiddhi Bhattacharjee
Dear all, I am using the .Call interface to call c++ code from R. For that, I am trying to create a dynamic library (mylib.so) using "R CMD SHLIB" by linking my own c++ code and an external c++ library (blitz++). The makefile works fine on my Mac, produces mylib.so and I am able to call .Call() f