Skip to content
Prev 6855 / 12125 Next

[R-pkg-devel] compiling C sources on windows

I suspect the cause is this:

https://github.com/bradleyjeck/epanet2toolkit/blob/aa698568ab85db133f8634928e8cfe661b41ed57/src/epanet2.h#L42-L61

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
#endif

If you need to test locally on Windows, there are free virtual
machines available here:
https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/

Best,
Kevin
On Mon, Apr 19, 2021 at 2:14 AM Brad Eck <bradleyjeck at gmail.com> wrote: