Author Topic: Fortran include files with non-standard extension  (Read 2639 times)

Offline pjpuchyr

  • Single posting newcomer
  • *
  • Posts: 3
Fortran include files with non-standard extension
« on: April 02, 2015, 11:19:21 pm »
Hi, I develop and maintain reservoir simulation codes which are a mix of C++ and Fortran.  I'm trying to convert to Code::Blocks, and so far, it is exceeding my expectations.  However, I have a minor problem: my Fortran include files have extension .i (yes, I know that's the standard C intermediate file; a lot of the Fortran code is very old).  I would like to have these include files in the project tree, so that they can be brought into the editor.  But in doing that, code::blocks tries to run SWIG on those files.  I've tried going into the advanced settings and turning off the special processing, but don't know enough to do it successfully.  Does anyone know how to have a non-standard file in the project tree, and tell code::blocks to ignore it? 
Thanks,
Peter

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Fortran include files with non-standard extension
« Reply #1 on: April 03, 2015, 12:18:51 am »
Did you try deleting the '.i' extension for the compiler your project is using in advanced settings?

Offline pjpuchyr

  • Single posting newcomer
  • *
  • Posts: 3
Re: Fortran include files with non-standard extension
« Reply #2 on: April 03, 2015, 12:33:48 am »
Yes, tried deleting the .i extension, but CB still went looking for a resulting .o file.  Also tried leaving the .i extension, but deleting the associated command, with the same result.

I guess I'll just have to leave them out of the project tree, and find some other way to be able to conveniently access them.

Offline pjpuchyr

  • Single posting newcomer
  • *
  • Posts: 3
Re: Fortran include files with non-standard extension
« Reply #3 on: April 03, 2015, 12:55:25 am »
DOH!  Just realized that CB was looking for .o files because of the automatically generated files.  I deleted all my .i files, which automatically got rid of all the generated files, made sure that the .i was not in the advanced compiler settings, added the .i files back in, and it all works fine.

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Fortran include files with non-standard extension
« Reply #4 on: April 03, 2015, 09:36:20 am »
If you had deleted the extension, there would have been no generated file. I think you just deleted the build command not the whole extension setting, am I right? I mean did you use the '-' button to delete the extension?