From edd at debian.org  Thu Mar 13 15:58:43 2014
From: edd at debian.org (Dirk Eddelbuettel)
Date: Thu, 13 Mar 2014 09:58:43 -0500
Subject: [Rd] Fwd: C code and DLL file in the package
In-Reply-To: <CANuoaEGsw4WNM2kJyj7JyKqMM+UmfevmFzNRGkpmPzHdnhtSKg@mail.gmail.com>
References: <CANuoaEEqK2WoxVj8-OHQfxkHGvBqmx3N6=OdjfBvVudZKS9ipA@mail.gmail.com>
	<CANuoaEGsw4WNM2kJyj7JyKqMM+UmfevmFzNRGkpmPzHdnhtSKg@mail.gmail.com>
Message-ID: <21281.51107.473292.800346@max.nulle.part>


Binbin,

On 13 March 2014 at 14:24, binbin lu wrote:
| I am trying to compile a package, in which C code is used.
| 
| When I was checking the package with the dll file under the sub-folder
| "SRC", a WARNING msg was returned:
| "Source packages should not contain undeclared executable files."
| 
| When I exclued it from the folder, I got an ERROR msg:
| 
| Error in library.dynam(lib, package, package.lib) :
|   DLL 'Cs2g' not found: maybe not installed for this architecture?
| 
| 
| Anyone knows how to solve this problem? Sorry for this naive question but I
| am really confused. Many thanks.

I see two cases here:

Case 1:  You intend to upload this package to CRAN

         --> Don't include the dll in the first place. See 'Writing R
             Extensions' for details.

Case 2:  You only plan to do use this locally.

         --> Learn more about package builds. See 'Writing R Extensions' for
             details, as well as 'R CMD INSTALL --help' and pay attention to
             single architecture builds.

             The Visual Studio tool chain is not officially supported by R,
             so you are unlikely to get specific help. You mix this, but it 
             is an advanced topic, and it is somewhat outside the supported
             range of endeavours with R, you are on your own.

             Google for 'mixing MinGW gcc and Visual Studio' and other topics.

Good luck,  Dirk

-- 
Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com



[Rd] Fwd: C code and DLL file in the package
Dirk Eddelbuettel