Code::Blocks

User forums => Using Code::Blocks => Topic started by: Jasen on June 22, 2018, 04:19:03 pm

Title: Precompiler flags
Post by: Jasen on June 22, 2018, 04:19:03 pm
Hello all!
The instruction to the source code says me to set a precompiler flag ASSIMILATION in the projects settings, in order some lines to be skipped during compilation. I am not very familiar with precompiler flags. So I tried to write in "Other compiler options": -ASSIMILATION, but it didn't help. Here is the code from the main.f90.
Code: [Select]
#ifdef _ASSIMILATION
      !use the Data Assimilation modules (pre-compiler flag ASSIMILATION to be set in Visual Studio project settings or in the makefile)
      USE ASSIMILATION_INTERFACE
      USE ASSIMILATION_ROUTINES
      USE ASSIMILATION_VARIABLES
#endif
Could somebody explain me, how to create these precompiler flags.
Now it's the only fatal error: Fatal Error: Can't open module file 'assimilation_interface.mod' for reading at (1): No such file or directory|
Title: Re: Precompiler flags
Post by: BlueHazzard on June 23, 2018, 04:19:35 pm
I don't know anything about fortran but if it is similar to the c preprocessor you have to add
-DASSIMILATION as other compiler option, or use the #defines tab of the compiler settings....