Skip to content

Compiling "R Embedded" examples

2 messages · Mauron Laurent (KETR 31), Brian Ripley

#
Hi,

Thanks for your suggestion. I re-compiled R-2.0.1 with gcc 3.3.2. but got exactly the same problem. 

I am very puzzled because the compilation of R is ok. Is there any piece of code that was succesfully compiled on my setup that could be used as an example of embedding R in C/C++ (tcltk for example?).

Thanks for your help,

Laurent


$gcc -v
Reading specs from /app/gcc_3.3.2/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/specs
Configured with: ../configure --prefix=/app/gcc_3.3.2 --with-local-prefix=/app/gcc_3.3.2 --enable-threads --enable-version-specific-runtime-libs : (reconfigured) ../configure --prefix=/app/gcc_3.3.2 --with-local-prefix=/app/gcc_3.3.2 --enable-threads --enable-version-specific-runtime-libs
Thread model: posix
gcc version 3.3.2

-----Original Message-----
From: Duncan Temple Lang [mailto:duncan@wald.ucdavis.edu]
Sent: 21 March 2005 20:01
To: Mauron Laurent (KETR 31)
Cc: 'r-devel@stat.math.ethz.ch'
Subject: Re: [Rd] Compiling "R Embedded" examples
Mauron Laurent (KETR 31) wrote:
I would install a different version of gcc (e.g. gcc-3.3.3) as that works on
one of the Solaris machines I use.

   SunOS 5.8 Generic_117000-05 sun4u sparc SUNW,Ultra-5_10


On that machine, all works fine.

  
    
#
On Tue, 22 Mar 2005, Mauron Laurent (KETR 31) wrote:

            
(Which problem is not described in this message and the stated URL is 
invalid.  Searching suggests it is related to MAIN__.)
No.  Only R.bin is in any way similar to the embedded examples: tcltk is 
run from R, not R from tcltk.

Solaris 8, gcc 3.4.3 works for me.

Note that MAIN__ is defined in Rmain.c, and that is part of R.bin and not 
libR.so.  You could try copying it is to Rtest.c to see if this helps.

What you have not told us is the Fortran that you are using.  That is 
likely to be the clue.  Try a current gcc AND g77 -- gcc is a Compiler 
Collection, not just a C compiler.