I apologize if all of this posting appears to be really wide in your browser. I don't know why that happened to my regular text and not just to the code text. Can anyone tell me what I'm doing wrong?
I'm using CVF 6.6B on Windows XP Pro. I am trying to get some code that was originally developed with Microsoft FORTRAN PowerStation 1.0a (a /= alpha, actually an update to v1.0) to compile properly with CVF.
I've fixed most of the problems, but I'm stuck on the two remaining ones.
This code comes with a .lib library file that I think was also created with MSFP. It contains what I believe are some display routines that allow the program to display graphics when run. I added the .lib file to my VS project.
The original code declared all of the references to the library routines like this:
That generated compilation errors for each declaration. I changed the declarations to this format:
integer*4, external:: GetMouseEvent
That took care of all the errors except for the one about the GetMouseEvent routine. The error message for it is:
S:DeveloperStudioTXSSimSub1.for S:DeveloperStudioTXSUTIL.FD(181) : Error: This name has already been used as an external procedure name. [GETMOUSEEVENT] integer*4, external:: GetMouseEvent -----------------------------^
I tried to figure out why the compiler treated GetMouseEvent differently. I couldn't find anything in the code, so I used the DUMPBIN utility on the .lib file. Part of the DUMPBIN output is:
SECTION HEADER #2 .data name 0 physical address 0 virtual address 20 size of raw data 5F6 file pointer to raw data (000005F6 to 00000615) 0 file pointer to relocation table 0 file pointer to line numbers 0 number of relocations 0 number of line numbers 300040 flags Initialized Data 4 byte align COFF SYMBOL TABLE 000 00000000 DEBUG notype Filename | .file MOUSE.ASM 002 00000000 SECT1 notype Static | .text Section length 592, #relocs 51, #linenums 0, checksum 0 004 00000000 SECT2 notype Static | .data Section length 20, #relocs 0, #linenums 0, checksum 0 006 00000000 ABS notype Static | FLAT 007 00000000 SECT1 notype External | _MOUSEINIT@0 008 000002F8 SECT1 notype External | _GETBUTTONPRESS@4 009 000003AB SECT1 notype External | _GETBUTTONRELEASE@4 00A 0000045E SECT1 notype External | _SETPTRVIS@4 00B 0000049A SECT1 notype External | _SETPTRXLIM@8 00C 00000516 SECT1 notype External | _SETPTRYLIM@8 00D 000001CD SECT1 notype External | _GETPTRPOS@4 00E 0000027C SECT1 notype External | _SETPTRPOS@8 00F 00000000 UNDEF notype External | __getvideoconfig 010 000000E5 SECT1 notype External | _GETMOUSEEVENT@4 String Table Size = 0x9C bytes Summary 20 .data 608 .text
I can see GetMouseEvent listed, but it comes after the line for __getvideoconfig, and that line has UNDEF (for undefined?) where every other line has SECT1. Is that significant? Can anyone suggest why I'm seeing the error for the GetMouseEvent routine?
There is one other error I can't figure out. The code contains a call to SETTEXTPOSITION. Compilation produces the error:
S:DeveloperStudioTXSOpConSb1.for(1619) : Error: There is no matching specific subroutine for this generic subroutine call. [SETTEXTPOSITION]
call settextposition (row0(isel),col0,tx)
I built this program as a console application (because I wasn't sure what it should be), and the routine containing the call to SETTEXTPOSITION originally didn't contain a USE DFLIB statement. When I put in that statement it caused several other errors, a sample of which is below:
C:Program FilesMicrosoft Visual StudioDF98IncludeDFLIB.F90(47) : Error: The procedure name of the INTERFACE block conflicts with a name in the encompassing scoping unit. [ARC] FUNCTION arc(x1,y1,x2,y2,x3,y3,x4,y4) -----------------^
This error refers to the following INTERFACE block in the DFLIB.F90 file:
INTERFACE FUNCTION arc(x1,y1,x2,y2,x3,y3,x4,y4) !DEC$ ATTRIBUTES DEFAULT :: arc !DEC$ IF DEFINED(_X86_) INTEGER*2 arc,x1,y1,x2,y2,x3,y3,x4,y4 !DEC$ ATTRIBUTES C,ALIAS:"__arc" :: arc !DEC$ ELSE INTEGER*2 arc,x1,y1,x2,y2,x3,y3,x4,y4 !DEC$ ATTRIBUTES C,ALIAS: "_arc" :: arc !DEC$ ENDIF END FUNCTION END INTERFACE
I also tried building the code as a graphics project since it uses graphics, but that made no difference in the results.
Can anyone help me determine the causes of these two errors?