Re: How to use GPS as a FORTRAN workbench?
Arjan van Dijk <[email protected]> Sun, 2 Mar 2008 17:58:04 +0100
| Newsgroups | gmane.comp.ide.gps.user |
|---|---|
| Message-ID | <OF8B83FAC5.E6B0B0F5-ONC1257400.005D351A-C1257400.005D3540@notesmail.rivm.nl> |
> > Can you tell me where I can specify .f90 as the default-extension for > > fortran90-files? Now only .f is recognized. > > To change the system-wide default, you can edit the > <gps-install>/share/gps/plug-ins/languages.xml file (Fortan 90 section). Thanks for showing this. GPS now indeed recognizes my .f90-files. Some more questions have popped up: 1) Can you tell me how I can make "fortran90" the default language for new projects? 2) Not all f90-files in my project directory belong to the project. Some .f90-files are just test-programs for certain subroutines or functions. Can I somewhere specify which files should be considered as part of the primary project and which not? 3) I get the impression that when you start a new project, the most important thing to do is to go to menu entry "Project --> Edit Project Properties". I don't seem to understand which settings represent what in this menu. If you don't mind, I walk by all of the tabs in this menu: On tab "General", I gave "test" as a new projectname and under "path" I referred to the directory where all source-code of the project is already located. The rest on this tab seems specific for ADA. Is this the case? On tab "Languages" I specified "fortran90" as the only language to use. Under tools, I told GPS that my compiler is g95. The default debugger is already gdb, so no need to change. I avoided tab "VCS". Probably something with version maintenance. Something for later. On tab "source dirs" I pointed out the directory of my source-files. Tab "Source Files" seems an important one, but I have no idea what to do here. Two tick-boxes are available: Source-list-file and source_files, but clicking on either of them does not make a change. Tab "Objects" show that all files generated by the compiler will by default be placed in the same directory as my project- and source-directory. Fine. What are "Main files"? Should I here specify which source-file contains the main program? I added the source-file that contains the main program. Tab "library" suggests that all object-code generated for files that are NOT the main program, can be placed in a library using utility 'ar'. Is this a required step? Or can I skip it? After I had changed the default-extension for fortran90 to be .f90, tab "Naming" tells me that .f90 is the Spec.Extension and the Predefined Extension. Fine. I guess there is no reason to take any action here. Tab "Switches" does not show anything. Does it have any function? 4) I closed "Project --> Edit Project Properties" and kept my fingers crossed. The messages window now tells me: [2008-03-02 17:24:04] Foo: Warning: there are no Ada sources in this project [2008-03-02 17:44:31] Foo: Body_Suffix cannot be empty [2008-03-02 17:44:31] Foo: ".." and "." have the same object file "..o" [2008-03-02 17:44:31] Foo: "bmp_io.h" and "bmp_io.c" have the same object file "bmp_io.o" [2008-03-02 17:44:31] Foo: "bmp_io.o" and "bmp_io.c" have the same object file "bmp_io.o" [2008-03-02 17:44:31] Foo: "getdeps.f90" and "getdeps.exe" have the same object file "getdeps.o" [2008-03-02 17:44:31] Foo: "libutil.mod" and "libutil.f90" have the same object file "libutil.o" [2008-03-02 17:44:31] Foo: "libxmath.mod" and "libxmath.f90" have the same object file "libxmath.o" [2008-03-02 17:44:31] Foo: "test.gpr" and "test.f90" have the same object file "test.o" [2008-03-02 17:44:31] Foo: "wgrib.c" and "wgrib" have the same object file "wgrib.o" Why would there be complaints about the simultaneous existence in a directory of .mod, .f90 and .o-files? Why does GPS complain about "." and ".."? As far as I know these are the names for the current directory and the parent directory. I have not specified them anywhere myself. 5) On the left, I have a window that contains the "project view". It shows me all the files in the project directory. The list is pretty long. Would it be better if I did not place all sources and object code in the project directory? 6) Where would I be able to specify that the project should be compiled via my special utility? And how would I then invoke it? Thanks for any reply on my very long and very ignorant questions. Regards, Arjan