- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some library routines that have been compiled with the options -Gm and -iface:nomixed_str_len_arg. I cannot change the compiler options on my main program so am defining an interface with compiler directives. I am using:
cDEC$ATTRIBUTES NOMIXED_STR_LEN_ARG,CVF ::ad45rdgrid
the compiler does not seem to recognise CVF and gives
ifort -unix -fpp:"-m" -DIWIN32 -O2 -I:../../nplot3d/inc -I:../../lib/fileio -I:V:/aero_win32x/esp/include -I:IWIN32 -I:V:/aero_win32x/esp/include/mod -I:C:/Apps/Tcl/include -I:C:/Apps/Tcl/include -I:/src/include -c -nologo -convert:big_endian -fpe:3 -traceback -MD -recursive hdf_util.F object:IWIN32/hdf_util.o
hdf_util.F(2216) : Error: Not a valid attribute for the DEC$ ATTRIBUTES directive. [CVF]
cDEC$ATTRIBUTES NOMIXED_STR_LEN_ARG,CVF ::ad45rdgrid
------------------------------------^
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is no such attribute CVF. There should be, but there isn't. Use this instead:
!DEC$ ATTRIBUTES STDCALL,REFERENCE,NOMIXED_STR_LEN_ARG,DECORATE,ALIAS:"AD45RDGRID" :: ad45rdgrid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I tried this and have another problem. Consider the following main routine
interface
subroutine sub1(ch,int,real)
#if defined (IWIN32)
cDEC$ATTRIBUTES STDCALL,REFERENCE,NOMIXED_STR_LEN_ARG :: sub1
cDEC$ATTRIBUTES DECORATE :: sub1
cDEC$ATTRIBUTES ALIAS:'SUB1' :: sub1
#endif
character*32 ch
integer int
real real
end subroutine sub1
end interface
character*32 ch
ch = 'character test'
int = 1
real = 999.0
call sub1(ch,int,real)
stop
end
and the subroutine
subroutine sub1(ch,int,real)
character*(*) ch
write(6,*)ch,int,real
return
end
If I compile the subroutine with -iface:cvf and the main routine without -iface:cvf then it links but will not run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page