Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compaq Fortran - Debugging

Status
Not open for further replies.

tuli01

Technical User
Aug 10, 2001
14
US
I've been using Compaq Visual FORTRAN for some time.
When I debug and it crashes, I always get the assembly(?) window and I am never able to see the location in the source code where the last line was executed.
I use this compliler sporadically for years, and never had the chance to get an answer to this question.

Please advise

Thank you
 
1) Are you building in debug or release mode?
2) Do you keep the .pdb with the executable?
 
Hi xwb,

Thank you for your response

1. I am in the debug mode
2. I do not know. where does it say?
 
Are you building this from visual studio or from the command line?
 
I don't have CVF but I have MS Powerstation, its predecessor and IVF, its successor. I assume it is more like Powerstation.

1) Click on View Toolbars. Make sure Project is checked. This will show you a toolbar which indicates what project you are building and which mode you are building it in. It should be set to win32 debug.
2) In the tree, right click on the project and select settings...
Under the Fortran tab, select Program Database. Also check Generate Source Browser Information. The default is no debug information.

That is basically it. Let us know how you get on.
 
Hello,

Unfortunately no luck.

I uploaded a summary of what's going on with this project and another one, where all I want to do is using a graphics library (DISLIN). Has no technical support and I think I did everything right, but I might have missed something.

Your help is appreciated

Thank you

PS Here are the download links:

 
Looks like CVF uses Visual Studio 6 as the IDE.

Type Alt F7 (or View/Debug Windows/Call Stack). Double click on the line that says AKBOR2. The rest are where it actually crashed but that line is where it was launched from.

In the second case, it looks like dislin.mod is missing from your dislin directory.
 
Hello,

I was able to run the example in a DOS window and get what I expected to get.
In the IDE environment though, it did not work. Got this message:

Linking...
dislin.mod : fatal error LNK1136: invalid or corrupt file
Error executing link.exe.

exa_f90.exe - 1 error(s), 0 warning(s)

The DISLIN manual says that there is a module for a number of Fortran compilers, among which the MS Visual C++ Digital Visual Fortran 5.x, 6.x.

My compiler is Compaq Visual Fortran Professional Edition 6.6.0. Could this be the problem? The module created for MS Visual C++ Digital Visual Fortran 5.x, 6.x.
Does not work with my IDE. It seems to work with the compiler/linker but not inside the IDE. Maybe other settings problems?

Please advise

Many thanks for your help
 
Compaq and Digital are the same. Basically Compaq bought over Digital and then HP bought over Compaq but sold the compiler to Intel. Enough history back to your problem.

dislin.mod is not required for the link - it is required for the compilation. It looks like dislin.mod is ok because it got through to the linking stage. To link, you need dislin.lib
 
Can I go from mod to lib? How?

I apologize for the ignorance
 
To start, you have some source programs and the dislin library consisting of .mod and .lib files.

All modules compile to form

o an obj file for linking
o a mod file containing the external interfaces for the module.

When a source file has use modulename, the compiler will look for the corresponding .mod file. Once everything has been compiled, you will end up with a whole bunch of .obj files. If there are no modules, then you will end up with just a bunch of .obj files.

The .obj files and .lib files link up to form a .exe. The .obj files do not need to be specified but the .lib files do.

That's basically it.
 
xwb,

It works!! Thank you very much for your patience. It turns out that
THERE WERE 4 libraries in the package. 2 of 2 types (total of four)
disdll.lib disdvf.lib and the corresponding disdll_d.lib disdvf_.lib.
I guessed the right combination needed for my case: disdll.lib
disdvf.lib. I did not yet find evidence about what they are, and how
they are supposed to work. The example has 30 different cases of
plots, and I choose the winning combination which showed to work for
all 30 cases. Other did pretty well with some exceptions.
I think 'vf' means visual FORTRAN and '_d' double precision, but these
are just guesses.
Again, thank you for your patience and help

tuli 01
 
_d means debug.

disdll.lib is the release version
disdll_d.lib is the debug version

You can use either. The debug version gives you symbolic information so you know where your program crashed. Most of the time you already know that so it is pretty pointless.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top