Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.LNX.4.44.0402022315110.2149-100000@gannet.stats>
Date: 2004-02-02T23:16:26Z
From: Brian Ripley
Subject: problems when compiling C code
In-Reply-To: <5.2.1.1.0.20040202162209.00b4c488@biomserv.univ-lyon1.fr>

On Mon, 2 Feb 2004, Stephane DRAY wrote:

> Hello,
> 
> I would like to call C code from R. My C code is divided in two files. In 
> the file "testpermut.c", I have the following lines:
> 
> #include "adesub.h"
> 
> In my working folder, I have the files:
> - adesub.c which contains general functions
> - adesub.h with the header of functions contained in adesub.c
> - testpermut.c which call some functions defined in adesub.c
> 
> When I try to  create my dll (Work on Windows XP, R-1.8.1), I obtain error 
> message:
> 
> $ Rcmd shlib testpermut.c

You only included one of the files. You need

Rcmd SHLIB testpermut.c adesub.c

I believe.

-- 
Brian D. Ripley,                  ripley at 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