- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I'm new in using Fortran.
I am creating a .dll from the following code:
testa.f
SUBROUTINE TESTA(ID)
!DEC$ ATTRIBUTES DLLEXPORT :: TEST
IMPLICIT NONE
INCLUDE 'params.f'
DOUBLE PRECISION SVAL,VAL(2*MAXYBOUN)
INTEGER ID,N(2),NOD(2*MAXYBOUN)
CHARACTER*1 TYP(2)
CALL DIRIC(ID,N,NOD,SVAL,VAL,TYP)
!--------OTHER CODES-------!
END
and the called function diric is
SUBROUTINE DIRIC(ID,N,NOD,SVAL,VAL,TYP)
IMPLICIT NONE
INCLUDE 'params.f'
DOUBLE PRECISION SVAL,VAL(2*MAXYBOUN)
INTEGER N(2),NOD(2*MAXYBOUN),K,J,NEQ,ID
CHARACTER*1 TYP(2)
!------------------------------------------------------------------!
! DIRIC code :
!------------------------------------------------------------------!
RETURN
END ! DIRIC
I get the LNK2019 error:
error LNK2019: unresolved external symbol _diric@32 referenced in function _testa
The error disappears if I remove the character array TYP in subroutine, i.e.
CALL DIRIC(ID,N,NOD,SVAL,VAL)
SUBROUTINE DIRIC(ID,N,NOD,SVAL,VAL)
but I need the array TYP.
Is there any suggestion how to solve this problem? Thanks!
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You must be compiling this code with some non-default options.Maybe you're using /iface:stdcall? Try /iface:stdref instead since the routine you're calling was apparently built that way.
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
You must be compiling this code with some non-default options.Maybe you're using /iface:stdcall? Try /iface:stdref instead since the routine you're calling was apparently built that way.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Yes it is set to /iface:stdcall. I change to default and it works... Thank you!
