From katie.cheon at gmail.com  Fri Apr 18 17:49:16 2008
From: katie.cheon at gmail.com (Kyeongmi Cheon)
Date: Fri, 18 Apr 2008 08:49:16 -0700 (PDT)
Subject: [Rd] R-extension in unix system -- help to locate header files
In-Reply-To: <alpine.LFD.1.00.0804180608260.843@gannet.stats.ox.ac.uk>
References: <d9ad173c0804172123y6f5470fdh14a991b4bc168bc7@mail.gmail.com>
	<alpine.LFD.1.00.0804180608260.843@gannet.stats.ox.ac.uk>
Message-ID: <16763526.post@talk.nabble.com>



Thank you for your reply. I'm really new to this unix system and let me ask
one more 
time to make sure if I understand it right.

So I do it this way?
1. Change my codes to like below:
 #include <stdlib.h> 
 #include <R.h> 
 #include <Rdefines.h> 
 #include <Rmath.h> 
 #include <R_ext/Applic.h> 
 #include <R_ext/PrtUtil.h> 

2. and at the command line,
set path = (/gpfs/data/local/linux/R-2.6.2/lib64/R/include $path) 
set path = (/gpfs/data/local/linux/R-2.6.2/lib64/R/include/R_ext $path) 

Then what is about -I flags? I googled it but couldn't find anything. I
don't really 
know what you meant by "The search paths ....  supplemented by -I flags on
the command 
line". How do I use it? Like this?
set path = (/gpfs/data/local/linux/R-2.6.2/lib64/R/include $path) -I


Thank you so much.
Kyeongmi Cheon

University of memphis

................

You should never give full paths in #include statements.

The search paths for include ('header') files are set by the compiler and 
supplemented by -I flags on the command line.  If your C compiler is 
unable to find <stdlib.h> something is badly wrong, and you need to ask 
your 'unix' advisor for help.  (BTW, these header files are OS-specific, 
and some of them will be compiler-specific -- on my Solaris Unix box cc 
and gcc use different versions of some of these headers.)


-----
Kyeongmi,

University of Memphis
-- 
View this message in context: http://www.nabble.com/R-extension-in-unix-system----help-to-locate-header-files-tp16760424p16763526.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] R-extension in unix system -- help to locate header files
Kyeongmi Cheon