Silverfrost Forums

Welcome to our forums

No debugging from VS-Project

31 Oct 2007 10:40 #2392

I use MS VS 2003 with FTN95 5.1.0.0 and have a C++-project calling a Fortran project. I'd like to debug the Fortran part as well which doesn't work. I also tried that for the test-project 'visualcinteroperability' and it doesn't work as well.

Some of the configurations of the Fortran-project are WIN32 Debugger type: sdbg Debug target: [...]\FortranApplicationExtension1.dll Output filename: [...]\FortranApplicationExtension1.lib

apart from that the program seems to do what it is intended to do. I don't have a sdbg.ini on my disk. (OS is XP)

any help would be appreciated!

Uwe

31 Oct 2007 12:25 #2394

If you are creating a C++ project from Visual Studio then you must be using the Microsoft C++ compiler.

FTN95 is designed to coexist with the Salford C++ compiler SCC. By default FTN95 and SCC both use CDECL rather than STDCALL. Microsoft C++ uses STDCALL.

By default Microsoft C++ and FTN95 use different linkers.

There will be issues that need to be resolved if you proceed with this approach.

If you can manage with Plato then it uses Salford C++ and a common linker but Plato does not have the ability to manage multiple projects in one solution.

1 Nov 2007 11:00 #2398

The main problem here is that when you try and debug your program, Visual Studio will use its internal debugger and the FTN95 one will not get a sniff.

Your best bet is to debug your C++ in Visual Studio and the FTN95 DLL in SDBG. You should be able to debug your DLLs by invoking SDBG on the main program.

2 Nov 2007 10:32 #2402

Thank you both for your quick reply!

This seems to be a bit more complicated than I hoped it would be, and I must admit that my knowledge of how compiling and linking is achieved is quite limited... Calling SDBG seems to be really appealing, but how can I do this?

thanks! Uwe

2 Nov 2007 2:08 #2403

Just call

sdbg prog.exe

from a Command Prompt window (DOS box).

Prog.exe is the name of your executable. First change directory to the one that contains your exe or use the full path.

Further information about SDBG appears in the help file FTN95.chm.

2 Nov 2007 7:27 #2407

Dear Paul and Robert, I finaly managed to get to debugging, this really helps me a lot!

Thank you very much! Uwe

Please login to reply.