Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 19-Aug-97
Q. When I try to link Visual C++ 4.2 object files which contain
debugging information using the Absoft Linker, I get the following
error:
"symbol records not in natural alignment"
What should I do to correct this?
A. When linking object files created by Visual C++ 4.2, you need to
specify the /CVPACK switch to the Absoft linker.
index
|
Platform: Windows
Problem Details:
OS Version: All
Product Version: Pro Fortran v5.0 and v6.0
Date: 20-Aug-97
Q. I am getting an IOSTAT value that is between 10033 and 10070,
but I can't find it listed in the manual. What error is assigned
to this value?
A. The following table lists the missing error codes:
10033 Command not allowed for unit type
10034 MRWE is required for that feature
10035 Bad specification for window
10036 Endian specifier not BIG_ENDIAN or LITTLE_ENDIAN
10037 Cannot ENDIAN convert entire structures
10038 Attempt to read past end of record
10039 Attempt to read past end of record in non-advancing I/O
10040 Illegal specifier for ADVANCE=
10041 Illegal specifier for DELIM=
10042 Illegal specifier for PAD=
10043 SIZE= specified with ADVANCE=YES
10044 EOR= specified with ADVANCE=YES
10045 Cannot DEALLOCATE disassociated pointer or unallocated array
10046 Cannot DEALLOCATE a portion of an original allocation
10047 An allocatable array has already been allocated
10048 Internal or unknown runtime library error
10049 Unknown data type passed to runtime library
10050 Illegal DIM argument to array intrinsic
10051 Size of SOURCE argument to RESHAPE smaller than SHAPE array
10052 SHAPE array for RESHAPE contains a negative value
10053 Unallocated or disassociated array passed to inquiry function
10054 The ncopies argument to REPEAT is negative
10055 The S argument to NEAREST is negative
10056 The ORDER argument to RESHARE contains an illegal value
10057 Result of TRANSFER with no SIZE is smaller than source
10058 SHAPE array for RESHAPE is zero sized array
10059 VECTOR argument to UNPACK contains insufficient values
10060 Attempt to write a record longer than specified record length
10061 ADVANCE= specified for direct access or unformatted file
10062 NAMELIST name is longer than specified record length
10063 NAMELIST variable name exceeds maximum length
10064 PAD= specified for unformatted file
10065 NAMELIST input contains multiple strided arrays
10066 Expected & or $ as first character for NAMELIST input
10067 NAMELIST group does not match current input group
10068 Pointer or allocatable array not associated or allocated
10069 NAMELIST input contains negative array stride
10070 Runtime memory allocation fails
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 26-Aug-97
Q. I get errors when using the Windows header files with your C compiler.
A. Use the -windefs compiler option (see Page 4-23 of the User Guide).
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 08-Sep-97
Q. How do I pass an array from VB to a DLL?
A. Refer to your Microsoft VisualBasic Programmer's Guide page 652. VB
passes entire arrays using OLE Automation argument protocols. Absoft
F77/F90/C/C++ expect CDECL arguments. The VB manual section explains how to pass the
address of the first argument of the array. Basically:
Declare ... lParam as Any
Dim array(100)
Call DLL(array(0))
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 21-Aug-97
Q. The C/C++ compiler driver does not recognize the environment
variable INCLUDE.
A. Use the variable ACCINCLUDE instead.
Set ACCINCLUDE=C:\ThisPath;D:\ThatPath
index
|
Platform: All
Problem Details:
OS Version: any
Product Version: any
Date: 22-Sep-97
Q. Where can I find IMSL documentation.
A. The documentation for the IMSL libraries (7 volume set) may be
purchased separately, or you can find it on line at:
http://www.vni.com/products/imsl/alphabetized_functions.html
index
|
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 22-Sep-97
Q. I have been trying to compile a Windows program using Absoft Fortran 77.
I forced a map to be generated and it became clear that the subroutines
and functions are being renamed-"ABOUTPROC" becomes "_ABOUTPROC@16" for
example. And the module that calls the routine is not using the modified
name. What is the correct way to compile and link such programs?
A. This is STDCALL mangling. The leading underscore is normal for Windows
API compliant procedures. The trailing @nn is the size of the stack that
needs to be popped by the callee (4 times the argument list count). STDCALL
uses a callee stack pop protocol and the name mangling helps the linker pick
the proper procedure.
When the ABOUTPROC function is included in the main source file, the
compiler can match the argument lists. When it's separate, the compiler does not
know how many arguments the ABOUTPROC function will take. It mangles the
name as:
_ABOUTPROC
You need to create an alias file to map the name:
_ABOUTPROC_ABOUTPROC@16
index
|
Platform: Windows
Problem Details:
OS Version: Any
Product Version: Fortran77
Date: 24-Sep-97
Q. Does FORTRAN 77 support the -r8 flag?
A. Use the -N113 compiler option.
The -N2 option forces all intrinsic functions to be performed
in DOUBLE PRECISION.
index
|
Platform: Windows
Problem Details:
OS Version: any
Product Version: any
Date: 02-Oct-97
Q. I have a file which "uses" a precompiled by module containing a
function used by the main file. When I try to compile the main it
says there is an unresolved reference.
A. Your module contains executable code. Precompiling it created both
a module file and an object file. Present the object file to the linker
and the reference will be resolved. If you're compiling from the
command line, simply add the object file on the compiler invocation
line.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 08-Oct-97
Q. What is "point" in MoveToEx? I found the RECORD statement, but
no corresponding STRUCTURE statement in main.f
A. It looks like this:
STRUCTURE /POINT/
INTEGER*4 x
INTEGER*4 y
END STRUCTURE
The source is: ...\Absoft\FInclude\Windef.inc
The include files for FORTRAN 77 and the module files for Fortran 90
are translations of the Microsoft C header files (also included with
Pro Fortran). The easiest way to look these up is to select "Find"
from the "Start" menu and then choose the "Find Files or Folders..."
command:
1. Under the "Name and Location" tab, leave "Named" blank, but set
"Look in:" to "...\Absoft\FInclude".
2. Under the "Advanced" tab, fill in what you're looking for in the
"Containing Text" edit box. For example: "STRUCTURE /POINT/"
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: Any
Date: 16-Oct-97
Q. How do I pass a Visual Basic string to a DLL?
A. Visual Basic strings are maintained in a data structured
referred to as a BSTR which is not compatible with other
languages in a DLL. However, you can pass a null terminated,
C programming language string in Visual Basic. The
declaration and usage would take the following form:
Private Declare Sub getString Lib "Test" Alias "_getString@4" _
(ByVal text As String)
Private Sub Command1_Click()
Dim text As String
text = "hello, world"
Call getString(text)
End Sub
The key is to pass the string by value (ByVal).
At the FORTRAN end:
stdcall subroutine getString(p_theString)
implicit none
! FORTRAN expects the string lengths to be passed
! after the formal argument list as values. Since
! Visual Basic does not do this and because this is
! a STDCALL procedure, we need to accept the argument
! as a general pointer to a string passed by value.
integer p_theString; value p_theString
! local variables
character*1024 string ! longer than expected
pointer (p_string, string)
character*1024 temp, title
integer length, p_temp, p_title, i
! definitions for using the Win32 API MessageBox function
include "windef.inc"
include "winuser.inc"
! the Visual Basic string is passed as a null terminated
! C string. The first thing we have to do is find the
! null to determine the length of the string.
p_string = p_theString
length = index(string, char(0))
if ((length .lt. 2) .or. (length .gt. 1024)) return
! copy the string to a local (and safe) variable.
! initialize the message box title string
temp = string(1:length-1)
title = "FORTRAN DLL"
! null terminate the strings for the call to "Message Box"
temp = trim(temp)//char(0)
title = trim(title)//char(0)
! create pointers to the strings so they can be
! passed by value to the Win32 API function "MessageBox"
p_temp = loc(temp)
p_title = loc(title)
i = MessageBox(val(0),val(p_temp),val(p_title),val(MB_OK))
end
Use the following commands to build the DLL (assuming the
FORTRAN source file is "test.f"):
f77 -c test.f
lnk -lib test.obj -exports:test.xps
lnk -dll test.obj -exports:test.xps absRT0.lib kernel32.lib user32.lib \
fiodll.lib fmathdll.lib -aliases:unicode.als
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 22-Oct-97
Q. Apparently the compiler considers the variable NORMX as integer even
though I explicitly typed it as:
real normx
Please fix the compilers and send me the patch.
A. There is no need to provide a patch for the compiler.
The FORTRAN 77 compiler is case sensitive. You can use either
of the two following options to disable case sensitivity:
-f fold to lower case (User Guide pp. 4-13, 5-1, A-3)
-N109 fold to upper case (User Guide pp. 4-14, A-3)
Caution: The use of either option will make it impossible
to communicate directly with the Windows API.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 31-Oct-97
Q. I receive linker errors when compiling C programs which reference
certain POSIX functions such as open(), close(), read(), write(), etc.
Am I missing a library?
A. Unlike most other operating systems, a POSIX library is not supplied
with Windows. Is is only included with the Microsoft C/C++ compilers.
Absoft supplies an ANSI C library, but POSIX functions are not defined
as part of that library. We recommend for portability reasons that you
use the ANSI C streams functions such as fopen(), fclose(), fread(),
fwrite(), etc.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 11-Dec-97
Q. Could I put in a plea for an MRWE sample program (or is there one
already - I couldn't find it)?
A. In the "ABSOFT\EXAMPLES\MRWE" folder, you'll find two
makefiles:
1. makefile. This one constructs the mrwe.lib library. Simply
enter "amake" from the MS-DOS Prompt command line in this
directory to (re)build the library. Don't forget to copy
the output to "ABSOFT\LIB"
2. makefile.dev. This one constructs the debugging version of
mrwe and includes a demo of some of mrwe's features in its
main program: "main.f". Enter "amake -f makefile.dev" to
build this version. This version is an application: main.exe
and can be executed out of this directory. This is to simplify
the development process. After changes are made, the
release version should then be built as outlined in 1., above.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 15-Dec-97
Q. Is it possible to execute DOS commands like DIR or CLS
with the Unix library SYSTEM function?
A. You need to use "command.com" to execute the MS-DOS Prompt
built-in commands. For example:
call SYSTEM("command.com /c dir")
For WindowsNT use:
call SYSTEM("command /c dir")
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: Pro Fortran v6.0
Date: 08-Jan-98
Q. How do I more than one alias file using the IDE?
A. Enter your first alias file using the "Aliases File:" edit box provided
in the Link tab of the options dialog. Additional alias files may be
specified by inserting them manually into the "Selected Lnk Options:" edit
box at the bottom of the page, such as -aliases:yourfilename. When manually
inserting multiple alias files, be sure to specify a full pathname for the
file. Also make sure that any such entries appear only after the inital
alias entry in the "Selected Lnk Options:" edit box, otherwise they may be
overwritten the next time modifications are made to the provided "Aliases
File:" edit box.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 03-Mar-98
Q. How can I control the processor FPU?
A. You can use arm387 to control the FPU. This is an
integer function built into the runtime library. Here
are the definitions of the control arguments:
fenv.inc:
! Intel specific FPU control constants for use with fpcontrol
integer*4 FE_TONEAREST
parameter ( FE_TONEAREST = (z'00000000'))
integer*4 FE_TOWARDZERO
parameter ( FE_TOWARDZERO = (z'00000C00'))
integer*4 FE_UPWARD
parameter ( FE_UPWARD = (z'00000800'))
integer*4 FE_DOWNWARD
parameter ( FE_DOWNWARD = (z'00000400'))
integer*4 FE_INEXACT
parameter ( FE_INEXACT = (z'00000020'))
integer*4 FE_DIVBYZERO
parameter ( FE_DIVBYZERO = (z'00000004'))
integer*4 FE_UNDERFLOW
parameter ( FE_UNDERFLOW = (z'00000010'))
integer*4 FE_OVERFLOW
parameter ( FE_OVERFLOW = (z'00000008'))
integer*4 FE_INVALID
parameter ( FE_INVALID = (z'00000001'))
Then use arm387 as follows:
test.f:
implicit none
include "fenv.inc"
integer arm387
integer state
* first retrieve the current state of the FPU
state = arm387(0)
* enable divide-by-zero exceptions (for example)
state = arm387(state .and. .not. FE_DIVBYZERO)
end
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 29-May-98
Q. I am very much interested in using OpenGL for applications. Do
you have any simple examples of using them ProFortran?
A. OpenGL was produced by Silicon Graphics. The libraries are included
by Microsoft on Windows NT systems. We supply them on the CDROM so
that Windows 95 users will have them available. You can get more
information from:
http://www.sgi.com/software/opengl/faq.html
index
|
Platform: All
Problem Details:
OS Version: Any
Product Version: Pro Fortran 6.0 and later
Date: 04-Sep-98
Q. How can I modify the default behavior of the Absoft runtime library?
A. Starting with Absoft Pro Fortran 6.0 and Absoft Fortran SDK 4.5, the
runtime library checks for an environment variable named ABSOFT_RT_FLAGS
on entry to the first I/O statement in a program.
The following switches can be specified using this variable:
-defaultcarriage:
Causes the units preconnected to standard output to interperet
carriage control characters as if they had been connected with
ACTION='PRINT'.
-fileprompt:
Causes the library to prompt the user for a filename when it
implicitly opens a file as the result of I/O to an unconnected
unit number. By default, the library creates a filename based on
the unit number.
-vaxnames:
Causes the library to use 'vax style' names (FORnnn.DAT) when
creating a filename as the result of I/O to an unconnected
unit number.
-unixnames:
Causes the library to use 'unix style' names (fort.nnn) when
creating a filename as the result of I/O to an unconnected
unit number.
-bigendian:
Causes the library to interpret all unformatted files using
big endian byte ordering.
-littleendian:
Causes the library to interpret all unformatted files using
little endian byte ordering.
-noleadzero:
Causes the library to surpress the printing of leading zeroes
when processing an Fw.d edit descriptor. This only affects the
limited number of cases where the ANSI standard makes printing
of a leading zero implementation defined.
-reclen32:
Causes the library to interpret the value specified for RECL=
in an OPEN statement as 32-bit words instead of bytes.
Note: the leading minus sign is required for each switch and multiple
switches must be separated by one or more spaces.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 15-Sep-98
Q. Whenever I try to debug my program, Fx displays a dialog box
that reads "Unable to load object file" followed by the name
of my program. How do I get Fx to debug my program?
A. This error is most likely displayed because the program you are
trying to debug does not contain any symbolic debugging information.
Make sure that you are compiling your source code with the -g option
and linking it with the -debug:full and -debugtype:both options. If
you are using one of the compiler drivers (f77.exe/f90.exe/ACC.exe) to
do both compilation and linking, you only need to specify the -g option, as in:
f77 -g program.f
But if you are using a separate link step, you will need to supply the
additional options to the linker, as in:
lnk -o program.exe -debug:full -debugtype:both program.obj
index
|
Platform: Windows
Problem Details:
OS Version: Windows 95/98 and NT
Product Version: Pro Fortran 6.0
Date: 10-Nov-1998
Q. I can't find the Plug-ins tab on the Options Property Sheet.
How can I use the IMSL libraries?
A. Unfortunately, the Plug-ins tab is available only with
the MP version of Pro Fortran.
To use the IMSL libraries with the standard and academic
versions, simply add the library (C:\Absoft60\Lib\imsl.lib)
to your project with the "Add/Remove File(s)" command in the
"Configure" menu.
index
|
Platform: Windows
Problem Details:
OS Version: Windows 95/98 and NT
Product Version: Pro Fortran V6.0
Date: 11-Dec-1998
Q. When I choose the 'Snowflake' command in the MRWE demo, the program crashes.
A. The number of points in the call to LPtoDP is incorrect. It should be 2 points,
not the 4 specified.
Change line 365 of main.f to:
call LPtoDP(val(dc), rect, val(2))
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: Pro Fortran v6.0
Q. I can't get the VMS (or UNIX) libraries to link.
A. The libraries contain three entry points for each function. One
in all upper case, one in all upper case with a trailing underscore
and one in all lower case with a trailing underscore:
DATE
DATE_
date_
Be sure that your spelling matches one of these.
The libraries are maintained in C:\Absoft\lib:
vms.lib VMS compatibility library
unix.lib UNIX compatibility library
For example:
test.f:
character*40 argument
n = IARGC()
do i=1,n
call GETARG(i,argument)
print *,trim(argument)
end do
end
Also, some of the functions use system API calls.
For these you must also include the alias file
"Unicode.als". This can be done by typing
f77 test.f -aliases:unicode.als unix.lib
at the command prompt or if you choose to use the
compiler interface, go into "Set Options". Once the
dialog box comes up, click on the "Link" tab and type
"Unicode.als" where it says "Aliases File:"
then click OK.
index
|
Platform: All
Problem Details:
OS Version: any
Product Version: any
Date: 14-Jan-1999
Q. Does Absoft Fortran pass the lengths of strings like most Unix
Fortran compilers I've used?
A. Yes, string lengths are passed as extra arguments (by value) at
the end of the formal argument list:
C:\Absoft60>type main.c
#include <string.h>
void Fcode(char *, int, double *, int);
int main()
{
char string[13] = {"hello, world"};
int i = 1;
double d = 2.0;
Fcode(string, i, &d, strlen(string));
return 0;
}
C:\Absoft60>acc -c -A main.c
Absoft C/C++ Compiler 1.3, Copyright (c) 1994-1997, Absoft Corp.
C:\Absoft60>type fcode.f
subroutine Fcode(string, i, d)
character*(*) string
integer i
value i
double precision d
print *, string, i, d, len(string)
end
C:\Absoft60>f77 -o main.exe main.obj fcode.f
FORTRAN 77 Compiler 4.5, Copyright (c) 1987 - 1998, Absoft Corp.
C:\Absoft60>main
hello, world 1 2.00000000000000 12
C:\Absoft60>
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: Pro Fortran 6.0
Date: 03-Feb-1999
Q. Is there a way to read an ASCII tab character, CHAR(9),
from a file?
A. Tabs read from formatted files are expanded modulo TABSIZE
where TABSIZE is an environment variable. If TABSIZE is not
set, tabs are expanded modulo 8. If TABSIZE is set to 0, the
tab is passed unmolested to the application.
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 25-Feb-1999
Q: Is there an interface between Absoft Fortran and Microsoft's ODBC?
A: Canaima Software, a third party, provides f90SQL, which offers
a convenient and familiar way to directly read and write data
from Fortran programs to many applications formats. Product
details and a light version compatible with Absoft Pro Fortran
V5.0 and V6.0 for Windows is available for free download from
Canaima at:
http://www.canaimasoft.com
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 29-Apr-1999
Q. When I print a large(>33000)lines of data to
standard output using MRWE it crashes.
A. The maximum number of lines and characters is
defined in "c:\absoft60\examples\mrwe\mrwe.inc".
integer MAX_LINES; parameter (MAX_LINES = 32768)
integer MAX_CHARS; parameter (MAX_CHARS = 262144)
To increase these maximums, follow this procedure:
1.Edit the file "c:\absoft60\examples\mrwe\mrwe.inc"
MAX_LINES and MAX_CHARS are defined on lines 84-85.
Increase them as required. Save your changes.
2.From the "Absoft Pro Fortran" menu, open the
"Development Command Shell". Change your directory
to the MRWE source directory:
cd c:\absoft60\examples\mrwe
3.Delete all of the object files in this directory:
del*.obj
4.Enter the command to rebuild the library:
amake
5.Move the newly built library "mrwe.lib" to:
c:\absoft60\lib
index
|
Platform: Windows
Problem Details:
OS Version: Windows
Product Version: 6.0
Date: 20-May-1999
Q: I check the IMSL box in the Plug-ins tab and when I try to
build my application I receive a linker error:
# link error: invalid object file -imsl.als
A: Go to the Absoft FTP sight and download and run this fix:
ftp://ftp.absoft.com/pub/windows/profortran6.0/imslFix.exe
index
|
Platform: Windows
Problem Details:
OS Version: all
Product Version: all
Date: 01-Jun-99
Q. How do I use the Microsoft Win32 API?
A. Using the Microsoft Win32 API is beyond the scope
of Absoft technical support.
For more information on Win32 API see
the Win32 SDK help in the Absoft menu on
Absoft Pro Fortran 6.0.
index
|
Platform: Windows
Problem Details:
OS Version: all
Product Version: all
Date: 19-Aug-99
Q. I am working with MRWE and would like to be able to:
Clear the screen.
Use the '$' or '\' in an edit descriptor to position the
cursor at the end of text on the same line as a prompt
for information: FORMAT(A, \).
Change the text font.
Print the graphics window.
A. Go to our download site:
http://www.absoft.com/download/standardwindows6.0downloads.html
The syntax of the new MRWE clear function is:
call mrwe_clear
To change the text font, edit the file "child.inc"
by leaving the desired font uncommented in lines
13-17.
index
|
Platform: Windows
Problem Details:
OS Version: all
Product Version: 6.0 and later
Date: 19-Aug-99
Q. Is it possible to use the Windows file mapping API to share a FORTRAN
COMMON block between two FORTRAN programs?
A. Yes. By using a combination of Absoft extensions this can be done.
See http://www.absoft.com/download/standardwindows6.0downloads.html
index
|
Platform: Windows
Problem Details:
OS Version: Any
Product Version: Any
Date: 17-Nov-1999
Q. I am trying to write a large array as one record and when using
the -N3 compiler option I get this run time error:
? FORTRAN Runtime Error:
? Buffer allocation failed
? WRITE(UNIT=3,...
A. The -N3 option instructs the compiler to read/write unformatted
sequential access files with record length information embedded
in the record. This places a 32-bit integer at the beginning and
the end of each record which allows the runtime library to skip and
backspace these records. Without the length information that would
be impossible.
However, your write statements try to write this entire array as one
record. With the -N3 option we have to allocate enough memory in one
contiguous chunk to create this record so that the length information
can be inserted at the beginning and the end. The allocation of this
buffer is what failed.
When the -N3 option is not specified, I/O transfers are performed using
much smaller (4096 byte) buffers since the data is pure binary with no
record length information.
If you receive this error on the Macintosh, then increase the memory
application size.
index
|
Platform: All
Problem Details:
OS Version: Any
Product Version: Any
Date: 17-Dec-1999
Q. I get the error message:
"adjustable array is not a dummy argument"
A. The most common cause of this is:
subroutine some_name(a,b,n)
real A(N), B(N)
The FORTRAN 77 compiler is case sensitive by default.
The easiest way to solve this type of problem is use a
case folding option: -f or -N109.
index
|
Platform: Windows
Problem Details:
OS Version:Windows 2000
Product Version: Pro Fortran 6.0
Date: 23-Dec-1999
Q. I have recently upgraded to Windows 2000 and when I try
to install Absoft Pro Fortran I get this error message:
"Severe
X Target system OS not supported "
A. You must upgrade to Absoft Pro Fortran version 7.0 to be
compatible with Windows 2000.
Please contact our sales department for more information.
Email: sales@absoft.com
Phone: (248) 853-0050
index
|
Platform: Windows
Problem Details:
OS Version: any
Product Version: Pro Fortran v6.0
Date: 31-Aug-00
Q. I am trying to use the Microsoft Visual Studio and the
Microsoft debugger does not recognize arrays and certain
other variables. I compiled all of my Fortran source files
with the -g compiler option to include symbolic debugging information?
A.Use the -N102 compiler option which causes the compilers to generate
debug information that can be interpreted by Visual C++ 5.0/6.0.
How do I use this new option?
When compiling your Fortran 77 and Fortran 90 source code, simply add
the -N102 option along with the -g option. For example:
f77 -c -g -N102 myfile.f
f90 -c -g -N102 myfile.f90
Why is this option necessary?
The Microsoft Visual tool kits have no knowledge of Fortran. This means
that they cannot interpret the debug information that Absoft compilers
generate for certain Fortran language constructs, such as arrays. Note
that there is nothing incorrect about the debug information the Absoft
compilers are generating for these constructs. It is fully conformant
with the Microsoft Codeview debugging format.
What changes when the -N102 option is used?
When the compilers see the -N102 option, they generate debug information
that attempts to describe Fortran language constructs as if they were
C language constructs. For example, arrays are represented as having a
constant lower bound of 0.
What still doesn't work with the -N102 option?
Any Fortran construct that cannot be mapped to C. For example, adjustable
size arrays, character*(*) strings, and Fortran 90 host associated
local variables.
index
|
Platform: All
Problem Details:
OS Version: Any
Product Version: Any
Date: 22-Sep-2000
Q. Is there an F90 compiler option that will force the compiler to
consider the byte ordering of all unformatted files to either big
or little endian?
A. Use the F90 open statement specifier:
convert ={"big_endian"|"little_endian"}
For example:
Open(10,file="filename",form="unformatted",convert="big_endian")
Or, use the ABSOFT_RT_FLAGS as described in the technical FAQ on
using the ABSOFT_RT_FLAGS environment variable which can
be found here:
win60tfaq.html#anchor0058
index
|
Platform: Windows
Problem Details:
OS Version: 95/98 and NT
Product Version: any
Date: 06-Oct-00
Q. My application compiles and runs fine with small arrays, but
when I increase the array sizes, I get an application error
when I run it. Is there a limit on program or array size?
A. Local variables are allocated on the stack. The default stack
allocation is 1 MB. When the total stack requirements exceed
that, a memory fault will occur. It is not easy to predict a
program's stack requirements, since it depends on the execution
path at any point in time. There are several solutions:
1. You can increase the stack size with the -stack option
described on page 4-41 of the Absoft Pro Fortran for Windows
User Guide. This option is entered in the Developer Tools
Interface by clicking on the "Lnk Options..." button.
2. If it is a Fortran program, you can use the "-s" compiler
option (static storage) to move the data from the stack
to the heap.
3. If it is a Fortran program, you can place the arrays in
a COMMON block which allocates them in the heap.
index
|
Platform: Windows
Problem Details:
OS Version: any
Product Version: any
Date: 06-Oct-00
Q. I'm having problems using the IMSL functions. The linker reports
unresolved references for any function I try to use.
A. You must include the IMSL library:
Windows: imsl.lib
Macintosh: "{AbsoftLibraries}"imsl.lib
Linux: libimsl.a
as an argument to the linker.
On Windows and Macintosh, the libraries have been compiled with the
fold to lower case option (-f) enabled. On Linux, they have been compiled
with the fold to upper case option (-N109) enabled. It will be necessary
either to:
a) use a compiler case folding option
b) spell the library names in the correct case
c) use a linker alias file (not available on Linux)
index
|