-2

I am building a large Fortran project with hundreds of files that has successfully been built using make. I am now trying to create an Eclipse project for it, but have run into a strange problem, which I don't believe is a Fortran problem.

As I added one of the last files to the project (building after each addition), I got an internal build error from Eclipse, "Can't find a module named: to". I don't make any calls to a function named "TO" and, in an effort to find the source of the problem, the added file has had all its lines commented out. So it now looks like

SUBROUTINE FOO(X)
RETURN
END

When I remove the file from the project, I get normal "can't find module _foo" errors. When I add it, I get the Internal Build Error.

Is there a way to get a detailed output of what the builder is doing so I can find where my build problem is?

Also, Is there a way to compile one file in Eclipse without compiling & linking the whole program?

Dan Eckhart
  • 245
  • 2
  • 8
  • 3
  • 1
    This is not "a problem caused by [my] code", which is what your linked article is about. This is a request for help in working with Photran and Eclipse. Perhaps if someone had seen a similar problem, they would also be able to chime in. Your comment is unhelpful. – Dan Eckhart Oct 22 '18 at 18:12
  • 3
    It does not matter whose fault it is. We need a thorough description how to reproduce your problem. The error message is about modules and there is no module in the code you show. Please do not attack people trying to help this way. – Vladimir F Героям слава Oct 22 '18 at 18:42
  • 1
    I am, as a recurrent user of this site, keen to find a solution to your problem. Although, I can't reproduce the error, I don't know the files names, hierarchy or contents, I have no access to the compilation commands, options, makefile, I don't know how is your ide configured and a simple Google on your error message was of no help. Please, take into account @VladimirF's comment and reduce your problem to a [mcve]. – Rodrigo Rodrigues Oct 23 '18 at 04:01
  • As I explained, the problem didn't manifest itself until the project was not Minimal. And if the problem was solvable by a simple Google search, I wouldn't have posted it. – Dan Eckhart Oct 23 '18 at 12:40
  • 1
    @DanEckhart Though not sure at all, this page says that the file name may need some care when using a Fortran module (and also that the word "module" is used in two different ways) https://software.intel.com/en-us/forums/intel-fortran-compiler-for-linux-and-mac-os-x/topic/627996 (And for an IDE, Code::Blocks might be more straightforward, possibly?) – roygvib Oct 23 '18 at 12:56

1 Answers1

1

As suggested by roygvib (in this link to Intel Developer Zone), the problem seems to be particular to Eclipse and how it builds Fortran projects. Although I am not able to use a different IDE as he suggested, I was able to get around this problem by creating a new C++ project from an existing makefile (but it's still Fortran) described here. The makefiles I had were somewhat convoluted, but Eclipse had no problem finding all the source code and building correctly.

Dan Eckhart
  • 245
  • 2
  • 8