Po
2011-Jun-02 11:11 UTC
[Rd] Problem to execute a function loading by my package that I created
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.
Po
2011-Jun-03 08:41 UTC
[Rd] Problem to execute a function loading by my package that I created
I still look for my problem. I think that maybe my Makefile is not good. In my folder src of my package, I put an existing program. In this program, I had already a makefile. So I kept this makefile and I changed. I saw that it's better to have a file Makevars to compile. But I don't know what is a file Makevars and I don't know how I can gather the files Makefile and Makevars together. Thank you in advance, Pauline -- View this message in context: http://r.789695.n4.nabble.com/Problem-to-execute-a-function-loading-by-my-package-that-I-created-tp3568081p3570314.html Sent from the R devel mailing list archive at Nabble.com.
Maybe Matching Threads
- [PATCH] pxelinux: open_file() returns a non-negative handle
- 406 Not Acceptable with swfupload
- [RFC, PATCH] core/pxe: Add architecture-specific discovery request for PXE config file
- syslinux efi configuration file name proposal
- A warning message generated from 'read.csv'