2

I have a program, written in fortran90, previously successfully compiled on a compaq compiler and working, that I'm now trying to compile with gfortran. I can compile the code to an .exe and run it. It works fine until a certain point in the routine and then an error is thrown.

My current configuration:

  • Windows 7
  • Eclipse Juno with CDT
  • Photran
  • Cygwin installation with gfortran compiler and GDB debugger (gdb.exe)
  • Configurations for the debugger:
    • GDB command set: Standard (Windows)
    • Protocol: mi
    • Shared libraries: don't load shared library symbols automatically (when activating this, no changes are noted).

When running the debug command I get the following output:

.gdbinit: No such file or directory.
Reading symbols from /cygdrive/c/Users/thys/Documents/doctoraat/12_in   progress/Hamfem/Debug/Hamfem.exe...done.
auto-solib-add on
Undefined command: "auto-solib-add".  Try "help".
Warning: C:/Users/thys/Documents/doctoraat/12_in progress/Hamfem/Hamfem/in: No such     file or directory.
[New Thread 5816.0x1914]
[New Thread 5816.0x654]

Basicly that leaves me with 2 questions:

  1. Where can I find the .gdbinit file in the cygwin installation?
  2. Are there any other possible errors in my setup, or points to think about?
4
  • Do you have spaces in names of directories or files? Commented Oct 20, 2012 at 17:26
  • no, made sure that no spaces were in the names or files Commented Oct 21, 2012 at 11:56
  • What is the warning message then? C:/Users/thys/Documents/doctoraat/12_in progress/Hamfem/Hamfem/in : No such file or directory. As for .gdbinit, it contains the commands for gdb to execute upon startup. You can create it in the directory where your program to debug resides. See this linky: eclipse.org/forums/index.php/m/638553 It makes sense sometimes to read docs: man gdb, info gdb. Commented Oct 21, 2012 at 13:28
  • I switched to gfortran and gdb on a linux machine. So didn't find the best configuration for Cygwin-Gfortran-GDB (and eclipse) on windows for developping fortran software. Commented Oct 31, 2014 at 15:17

1 Answer 1

1

Did you add the debugging information when compiling? When using gdb in console it shouldn't be a problem, except looking at memory addresses and a lot of gibberish, but there could be complications from using Eclipse...

Sign up to request clarification or add additional context in comments.

4 Comments

It turned out to be indeed the debugging information that was missing. The errors were declaration errors of do-loops, where the gnu-compiler is rather strickt
Nice. I guess this is some option in Eclipse... Would you tell me where it is?
There's no better reward for the help than accepting an answer.
When trying this solution I got some new errors. Set aside the work for a while, but picked it up again recently. Debugging information is present, no spaces in names and still no solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.