- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am updating a code originally written in Fortran77 for Fortran90/95 using Compaq Visual Fortran 6.6 on Windows XP with Win32 platform. The code is pretty substantial and compiles expect for one subroutine that uses Graphics routines. I have specified that the project type is Fortran Standard Graphics and the necessary library options and include file paths. I also have the USE DFLIB statement right after the SUBROUTINE statement. When I compile the code I get an error stating "Error: The procedure name of the INTERFACE block conflicts with a name in the encompassing scoping unit" and occurs for everything defined in the DFLIB.F90 file in the Microsoft Visual StudioDF98Include folder. I then used ONLY option to specificy only the functions I was using (like SETTEXTWIDOW, SETVIEWPORT, MOVETO_W, etc) but get the same result for those functions. Not sure what's going on here. Suggestions?
Thanks,
Amy
Thanks,
Amy
Link Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Amy,
It's hard to know for sure without seeing the code. My guess is that the subroutine where you're having problems is a contained routine in another routine or module and that you have somehow declared these routines in the outer scope. If it was done with a USE DFLIB that should be ok, but if somehow else, that might not be.
You do understand that CVF 6.6 is out of production and unsupported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
The subroutine GRAPH (that I'm having problems with) is contained within another routine. There are in fact many subroutines that are called within the major routine. I declare USE DFLIB at the beginning of the subroutine GRAPH and not at the very beginning of the code. As I understand it that should be sufficient in order to use functions from the quickwin library as long as you have declared the project as as Fortran Quickwin or Fortran Standard Graphics type. I have attached the subroutine GRAPH as a zip file. By the way, I am aware that CVF 6.6 is out of production and unsupported but my advisor doesn't seem to think we need to update yet.
Thanks,
Amy
The subroutine GRAPH (that I'm having problems with) is contained within another routine. There are in fact many subroutines that are called within the major routine. I declare USE DFLIB at the beginning of the subroutine GRAPH and not at the very beginning of the code. As I understand it that should be sufficient in order to use functions from the quickwin library as long as you have declared the project as as Fortran Quickwin or Fortran Standard Graphics type. I have attached the subroutine GRAPH as a zip file. By the way, I am aware that CVF 6.6 is out of production and unsupported but my advisor doesn't seem to think we need to update yet.
Thanks,
Amy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Amy,
Comment out the INCLUDE 'FGRAPH.FD'. This is an older way of doing what USE DFLIB does, and the two conflict.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I didn't check the code thoroughly, but my eyes stopped right at
INCLUDE 'FGRAPH.FD'line. I presumed something similar was the case -- basically, you're probably declaring the INTERFACE twice -- once through USE DFLIB (which is allowed) and once through INCLUDE (which acts like a text substitution, ergo you have a "local" INTERFACE and a USEd interface). Get rid of those INCLUDE lines, and you should be OK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, that solved the problem. While I'm at it, though, there are a couple other things I'm having problems with. All the MOVETO_W calls give an error "Error: The type of the actual argument differs from the type of the dummy argumen" for the first two arguments. All of the first two arguments are of type REAL and the same size (and greater than 8) though. Also the SETTEXTPOSITION calls give an error "Error: There is no matching specific subroutine for this generic subroutine call," so is it not finding that function in the quickwin library? The STATUS = LINETO_W and other similar statements don't have any errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regarding SetTextPosition: You have array HORZ2 declared as REAL, but you use it as an integer. You probably want to change its type.
Regarding MOVETO_W/LINETO_W: their arguments are REAL(8) (i.e. DOUBLE PRECISION), so you should go through the code and change the declarations. As for LINETO_W, its arguments are also REAL(8) -- perhaps the compiler doesn't issue outright error because it's a FUNCTION? I'd expect the error message like:
"WARNING: The function arguments do not match the prototype; assume EXTERNAL (LINETO_W)"
which you certainly don't want (you'll get a linker error later on).
Regarding MOVETO_W/LINETO_W: their arguments are REAL(8) (i.e. DOUBLE PRECISION), so you should go through the code and change the declarations. As for LINETO_W, its arguments are also REAL(8) -- perhaps the compiler doesn't issue outright error because it's a FUNCTION? I'd expect the error message like:
"WARNING: The function arguments do not match the prototype; assume EXTERNAL (LINETO_W)"
which you certainly don't want (you'll get a linker error later on).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The corrections are made and the code runs great. Thanks for the help.

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