Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [photran] mixed language project questions

Hi,

> Questions: Can photran handle include files in pure fortran projects?

Yes, although the support is a bit limited.  It can handle Fortran
INCLUDE lines (these are enabled by default in .f90 files) or
preprocessor #include lines (these are enabled by default in .F90
files), but only in free-form files, and it can't handle both kinds in
the same file (due to some annoying internal problems).

> is there
> any way to tell eclipse what language a .h file should be on a per-file
> basis so they
> will also work in mixed language code?

Not really. However, you can get the file to open in the "correct"
editor by right-clicking on the file, choosing "Open With", and
selecting either the C/C++ or Fortran editor. Eclipse generally
remembers which editor you opened a particular file with. Some
features (e.g., Open Declaration) probably won't work, but at least
you'll have syntax highlighting, Comment/Uncomment, etc.

> Also, it isn't clear what the consequences of creating the project as a
> photran project vs
> a cdt project is. I believe that all would be able to use the make file to
> build and
> run, regardless. Could someone explain?

Every Fortran project is also a C project, but not every C project is
a Fortran project. If it's a Fortran project, you get some additional
items in the project properties (analysis/refactoring, source form
settings, etc.) that are not available in pure C projects.

Hope this helps.

Jeff


Back to the top