I am totally new to mixed-language programming and am having difficulty creating a dll to be called by R. I found the following small example which supposedly works for the CVF 6.6 compiler online:
CDEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'mysub_' :: MYSUB
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
DOUBLE PRECISION X(N)
DO 10 J=1,N
When I try to load the dll in R using dyn.load(), I receive the following error message (I replaced the long path with <file> in the message):
Error in inDL(x, as.logical(local), as.logical(now), ...) :
unable to load shared object '<file>':
LoadLibrary failure: %1 is not a valid Win32 application.
I am using XE 12.1 with the Visual Studio shell and R 2.15.1. Are there other compiler directives or Project settings I shoudl experiment with?