- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Since version 10.0 a procedure entry and the procedure must have the same use of the STDCALL attribute.
I used the following code to assure that procedure and entry points all have the STDCALL attribute:
!DEC$ IF DEFINED (_DLL)!DEC$ATTRIBUTES DLLEXPORT :: VISCOS,VISL,VISV!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISCOS_DLL' :: VISCOS!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISV_DLL' :: VISV!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISL_DLL' :: VISL!DEC$ ENDIF
However, I still get the following error messages
E:IVFIF97SourceTrpprop.for(60) : Error: A procedure entry and the procedure must have the same use of the STDCALL attribute. [VISL] ENTRY VISL(Pin,Tin) ------------^ E:IVFIF97SourceTrpprop.for(65) : Error: A procedure entry and the procedure must have the same use of the STDCALL attribute. [VISV] ENTRY VISV(Pin,Tin)
The compiler settings are:
Compiling with Intel Fortran Compiler 10.1.013 [IA-32]...
ifort /nologo /Zi /Od /gen-interfaces /warn:interfaces /Qauto /Op /fpconstant /iface:mixed_str_len_arg /module:"Debug/" /object:"Debug/" /traceback /check:bounds /c /DLL /debug-parameters /Qvc7.1 /Qlocation,link,"D:Microsoft Visual Studio .NET 2003Vc7in" "E:IVFIF97SourceWrapper.for"
I have used these settings succesfully under 9.1
Any idea what I am doing wrong?
Walter Kramer
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason for the restriction is that otherwise the compiler would have to track through which entry point you entered in order to determine how to exit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I hope the following piece of code can help you detect where the problem is.
Thanks,
Walter Kramer
REAL(8) FUNCTION VISCOS(Vin,Tin)
USE STMCOMIMPLICIT REAL(8)(A-Z)REAL(8), INTENT(IN) :: Vin,Pin,TinINTEGER(4) IlimINTEGER(4) LCHARACTER*8 NAMECHARACTER*8, SAVE :: NAMEoldREAL(8), SAVE :: Fval,Arg1=-1.D3,Arg2=-1.D3!DEC$ IF DEFINED (_DLL)!DEC$ATTRIBUTES DLLEXPORT :: VISCOS,VISL,VISV!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISCOS_DLL' :: VISCOS!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISV_DLL' :: VISV!DEC$ATTRIBUTES STDCALL, REFERENCE, ALIAS: 'VISL_DLL' :: VISLEmsg=.FALSE. ! DON'T SEND ERROR MESSAGES!DEC$ ENDIFNAME='VISCOS'UC=UCinV=Vin*Vcnv(UC)T=(Tin+Tcnv2(UC))*Tcnv1(UC)
CALL STMLVL(NAME,V,T)
IF ((V.EQ.Arg1).AND.(T.EQ.Arg2).AND.(NAME.EQ.NAMEold)) GOTO 100!DEC$ IF DEFINED (_DLL)CALL MINMAXVT(V,T,Vlow,Vhigh,Tlow,Thigh)GOTO(1000) ICHKLIM(V,Vlow,Vhigh,& T,Tlow,Thigh,Xlim,Ylim,Ilim)!DEC$ ELSEIF ((T.LT.TMIN).OR.(T.GT.T5MAX+0.01D0)) GOTO 400IF ((V.LT.VMIN).OR.(V.GT.V5MAX)) GOTO 400!DEC$ ENDIFArg1=VArg2=TNAMEold=NAMEFval=VISC(1.D0/V,T)GOTO 100ENTRY VISL(Pin,Tin)L=1NAME='VISL'GOTO 10ENTRY VISV(Pin,Tin)L=0NAME='VISV'10
CONTINUEUC=UCinP=Pin*Pcnv(UC)T=(Tin+Tcnv2(UC))*Tcnv1(UC)
CALL STMLVL(NAME,P,T)
IF ((P.EQ.Arg1).AND.(T.EQ.Arg2).AND.(NAME.EQ.NAMEold)) GOTO 100!DEC$ IF DEFINED (_DLL)CALL MINMAXPT(P,T,Plow,Phigh,Tlow,Thigh)GOTO(900) ICHKLIM(P,Plow,Phigh,& T,Tlow,Thigh,Xlim,Ylim,Ilim)!DEC$ ELSEIF ((P.GT.PMAX+0.01D0).OR.(P.LT.PMIN)) G OTO 300IF ((T.LT.TMIN).OR.(T.GT.T5MAX+0.01D0)) GOTO 300IF ((P.GT.P5MAX+0.01D0).AND.(T.GT.T2MAX+0.01D0)) GOTO 300!DEC$ ENDIFArg1=PArg2=TNAMEold=NAMEGOTO(101,102,103,104,105) IREGCHKPT(P,T,L)101
CONTINUED=DPT1(P,T)Fval=VISC(D,T)GOTO 100102
CONTINUEIF (P.LT.P3MIN) THENTS=TSAT(P)IF (T.LT.TS) THENTLIM=TMSMIN(P)IF (T.LT.TLIM) GOTO 300IF (P.LT.P5MAX) THEND=DPT2ms(P,T)ELSED=DPT2(P,T)ENDIFELSED=DPT2(P,T)ENDIFELSED=DPT2(P,T)ENDIFFval=VISC(D,T)GOTO 100103
CONTINUEIF (L.EQ.0) THEND=DPT3G(P,T)ELSED=DPT3L(P,T)ENDIFFval=VISC(D,T)GOTO 100104
CONTINUEGOTO 300105
CONTINUED=DPT5(P,T)Fval=VISC(D,T)GOTO 100100
CONTINUEVISCOS=Fval/VIScnv(UC)CALL STMLVLCLR
RETURN300
CONTINUECALL STER(NAME,12,P,T)RETURN400
CONTINUECALL STER(NAME,42,V,T)RETURN900
CONTINUEVISL=-Ilim*1.D3RETURN1000
CONTINUEVISCOS=-Ilim*1.D3RETURNEND FUNCTION VISCOS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What specific version of 10.0 are you using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am actually using 10.1.013. I never tried to recompile this specific code under 10.0.
The code belongs to a rather large library for calculation of water and steam properties with a lot of cross references.
There are even some circular references between modules, which are resolved by repeated compilation.
So that is why I didn't post thecomplete code.
Walter Kramer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should also restructure your code so that you don't have circular module dependencies.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page