[R-pkg-devel] compiling C sources on windows
br@d|eyjeck @end|ng |rom gm@||@com
Mon Apr 19 21:54:18 CEST 2021
Thanks Kevin, that fixed the compilation issue. On to the next!
On Mon, Apr 19, 2021 at 5:06 PM Kevin Ushey <kevinushey using gmail.com> wrote:
> I suspect the cause is this:
> Usually, you only need to explicitly use __declspec if you're
> compiling with MSVC -- it shouldn't be necessary when using a MinGW
> toolchain (as R's toolchain is). You could try adding something like:
> #ifdef __MINGW32__
> #define DLLEXPORT
> If you need to test locally on Windows, there are free virtual
> machines available here:
> On Mon, Apr 19, 2021 at 2:14 AM Brad Eck <bradleyjeck using gmail.com> wrote:
> > Dear List -
> > I'm working to get a package of mine that was archived last year back on
> > CRAN.
> > The epanet2toolkit provides an R interface to the EPANET simulation
> > that is written in C.
> > The latest development version of the package builds and checks ok on mac
> > and linux but fails to
> > compile and install on windows with a bunch of errors like:
> > undefined reference to `_imp__*`
> > where * is some function defined in a header file and implemented in the
> > corresponding source file.
> > Am i missing a compiler flag or something?
> > Current output from winbuilder :
> > https://win-builder.r-project.org/9aIcl8Fxu7w1/00install.out
> > or https://pastebin.com/8JQNpNKp
> > source code: https://github.com/bradleyjeck/epanet2toolkit/tree/v22dev
> > Any insights appreciated.
> > Brad
> > [[alternative HTML version deleted]]
> > ______________________________________________
> > R-package-devel using r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-package-devel
[[alternative HTML version deleted]]
More information about the R-package-devel