Re: [R] Compiling "embedding R" examples

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu 17 Mar 2005 - 21:50:07 EST

Please read the posting guide and

  1. Use the appropriate list, R-devel, and
  2. Tell us enough about your environment, for example which OS this is.

On Thu, 17 Mar 2005, Mauron Laurent (KETR 31) wrote:

> Hi,
>
> I am working at a major financial institution and we would like to embed R in one of our front office application.
> The application is written in C/C++ so I started by trying to compile the examples in "tests/Embedding" of R 2.0.1.
>
> I have modified "tests/Embedding/Makefile" according https://stat.ethz.ch/pipermail/r-help/2005-February/064341.html
> and set "LD_LIBRARY_PATH" using
>
> export LD_LIBRARY_PATH="/home/laurent/R-clean/lib/R/lib"
>
> But I get the following error messages during linking:
>
> ---------------------
> laurent@pollux $ make clean
> laurent@pollux $ make
> gcc -I. -I../../src/include -I/home/laurent/R-2.0.1/src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/laurent/R-2.0.1/tests/Embedding/Rtest.c -o Rtest.o
> gcc -I. -I../../src/include -I/home/laurent/R-2.0.1/src/include -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /home/laurent/R-2.0.1/tests/Embedding/embeddedRCall.c -o embeddedRCall.o
> ../../bin/R CMD LINK gcc -o Rtest Rtest.o embeddedRCall.o -L/home/laurent/R-clean/lib -lR
> mkdir .libs
> gcc -o Rtest Rtest.o embeddedRCall.o -L/home/laurent/R-clean/lib -lR -R/home/laurent/R-clean/lib/R/lib
> Undefined first referenced
> symbol in file
> MAIN__ /home/laurent/R-clean/lib/libR.so
> ld: fatal: Symbol referencing errors. No output written to Rtest
> collect2: ld returned 1 exit status
> *** Error code 1
> make: Fatal error: Command failed for target `Rtest'
> -----------------------
>
> I have installed R from source using the following commands. I am running on solaris 8xx
>
> -----------------------
> laurent@pollux $ cd /home/laurent/R-clean/
> laurent@pollux $ /home/laurent/R-2.0.1/configure --enable-R-shlib --prefix=/home/laurent/R-clean
> laurent@pollux $ make
> laurent@pollux $ make install
> -----------------------
>
> Has anyone an idea where is the problem? I would be extremly grateful if someone could help us.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 17 22:00:08 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:50 EST