- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
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:
SUBROUTINE MYSUB(X,N,XMEAN)
CDEC$ ATTRIBUTES DLLEXPORT,C,REFERENCE,ALIAS:'mysub_' :: MYSUB
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
DOUBLE PRECISION X(N)
XMEAN=0D0
DO 10 J=1,N
XMEAN=XMEAN+X(J)
10 CONTINUE
XMEAN=XMEAN/N
RETURN
END
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.
nd.
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?
Many thanks!
Jeff
>
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
