View previous topic :: View next topic |
Author |
Message |
uwehag
Joined: 31 Oct 2007 Posts: 3
|
Posted: Wed Oct 31, 2007 11:40 am Post subject: No debugging from VS-Project |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Oct 31, 2007 1:25 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
Robert
Joined: 29 Nov 2006 Posts: 445 Location: Manchester
|
Posted: Thu Nov 01, 2007 12:00 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
uwehag
Joined: 31 Oct 2007 Posts: 3
|
Posted: Fri Nov 02, 2007 11:32 am Post subject: |
|
|
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 |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Fri Nov 02, 2007 3:08 pm Post subject: |
|
|
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. |
|
Back to top |
|
|
uwehag
Joined: 31 Oct 2007 Posts: 3
|
Posted: Fri Nov 02, 2007 8:27 pm Post subject: |
|
|
Dear Paul and Robert,
I finaly managed to get to debugging, this really helps me a lot!
Thank you very much!
Uwe |
|
Back to top |
|
|
|