From murdoch.duncan at gmail.com  Tue Oct 21 15:22:19 2014
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Tue, 21 Oct 2014 09:22:19 -0400
Subject: [Rd] How can I use R-function in My C++ project ?
In-Reply-To: <1f74c14.d1e7.14932a0ddbf.Coremail.2012111007@njau.edu.cn>
References: <1f74c14.d1e7.14932a0ddbf.Coremail.2012111007@njau.edu.cn>
Message-ID: <54465E0B.60709@gmail.com>

On 21/10/2014 8:14 AM, ?? wrote:
> Dear seniors:
>     I am a student in Nanjing Agricultural University of China.
>
>
>     I want to use the  function "optim"  of package stats in my C++ project. I have got the R.dll , R.def and R.lib,
>
>
> but I can't find the function prototypes of "optim" in R.def.
>    
>     How  can  I  do ?  Is the Method I call R function in C++ with R.dll feasible ?  I hope to get your help ! Thanks
>
>

See section 6.8, "Optimization", in the Writing R Extensions manual.   I 
believe these functions require all of R, not just the Rmath library 
documented in the previous section.  If you want your C++ project to be 
in control, it will need to act as a "front-end", documented in Chapter 8.

Duncan Murdoch



[Rd] How can I use R-function in My C++ project ?
Duncan Murdoch