[Rd] Problem to execute a function loading by my package that I created

From: Po <Pauline.Ferrouillat_at_hutton.ac.uk>
Date: Thu, 02 Jun 2011 04:11:15 -0700 (PDT)


Hello,

I'm a beginner on R.

I should create a package on R. The name of my package is SGeMS. In my package, I have a big program writed in C++. This program compiles in C++. I put this program in SGeMS/src.
In my program, I added a header file and a source file named respectively CreateFile.h and CreateFile.cpp.
CreateFile contains 5 functions : File, FileGeneral, FileData, FileVariogram and FileDistribution.

I use the package Rcpp to compile this. So in CreateFile.h, I added 'RcppExport' in front of all the functions. I compiled my package with R CMD INSTALL SGeMS. The compilation works.

In R, I put :
> library("SGeMS")

Loading required package: Rcpp
> is.loaded("File")

[1] TRUE
> is.loaded("FileGeneral")

[1] TRUE
> is.loaded("FileData")

[1] TRUE
> is.loaded("FileVariogram")

[1] TRUE
> is.loaded("FileDistribution")

[1] TRUE
> FileGeneral("parameters.par",general,3.0)
Error in .Call("FileGeneral", NameFile, general, SK_mean, PACKAGE = "SGeMS") :
  C symbol name "FileGeneral" not in DLL for package "SGeMS"

So I have a mistake. But I didn't know why. Is it possible to put folders and subfolders in /src ?

Awaiting reply,

Pauline

--
View this message in context: http://r.789695.n4.nabble.com/Problem-to-execute-a-function-loading-by-my-package-that-I-created-tp3568081p3568081.html
Sent from the R devel mailing list archive at Nabble.com.

______________________________________________
R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel
Received on Thu 02 Jun 2011 - 11:38:20 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 03 Jun 2011 - 14:10:15 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive