Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Debugging User Library Routines

wkramer
Beginner
1,712 Views
With CVF (developer studio) I have been able to debug routines, contained in a user library, when calling them from withina program that was linked against the library.
I don't seem to be able to do this anymore with visual studio .net.
Is this a so called "feature" of visual studio .net, or do I just need specific settings?
(I am linking against the debug version of the library, added the library to the project, added the libraries debug folder to fortran|general|additional include directories and to linker|general|additional library directories)
Walter

Message Edited by wkramer on 03-05-2005 04:29 AM

0 Kudos
5 Replies
Steven_L_Intel1
Employee
1,712 Views
Works fine when I try it. The method is the same as for CVF. You have to make sure that the library was built in a debug configuration. There's no need to change the include or library settings.

What goes wrong when you do it?
0 Kudos
wkramer
Beginner
1,712 Views
Step into (F11) results in a step over.
I have no idea what goes wrong.
I tried to debug iflogm.f90 to find out why the close button of sysmenu doesn't function (even if I tweak iflogm to capture wm_close, which used to function correctly),but I noticed I couldn't step into the source code (which I could under CVF).
But if you don't observe the same problem, I suppose I must have somewrong settings. I will experiment a bit furtherto find out what I am doing wrong.
Walter
0 Kudos
Steven_L_Intel1
Employee
1,712 Views
Try adding iflogm.f90 to your project and rebuilding.
0 Kudos
wkramer
Beginner
1,712 Views
If I add iflogm.f90 to my project I get all kind of link errors, which are related to the fact that iflogm.obj is linked into the program.
I also get some unresolved externals (see attached buildlog.txt).
The generated *.mod files are OK, because if I copy these to the compiler80ia32include directory and exclude iflogm.f90 from the build, the project builds without problems (no unresolved externals ???). Of course then I cannot debug the routines defined in iflogm.f90.
The source code is available and the path to the source codein the *.mod file is correct, so I suppose this information is also available in the executable code. I expect it to be possible to step through the code (as I can under CVF), but despite numerous experiments with settings, step into is completely ignored.
How do you achieve debugging a routine contained in a library?
Walter
0 Kudos
wkramer
Beginner
1,712 Views
I had both the library and the calling program build with full debugging, but the calling program was linked against libcmt.lib and the library against the debugging version libcmtd.lib. After correcting this I could debug the library routines.
It still seems odd, because the linker should have noticed the conflicting libraries.
I think there must have been some installation error because the linker detected the problem after reinstalling package w_fc_pc_8.1.025
I then reinstalled w_fc_pc_8.1.028 and then the problem was also detected by the linker.
Walter
0 Kudos
Reply