In these instances, the source code for the module must be recompiled for the version of GNU Fortran shipped with Simply Fortran. Additionally, development of GNU Fortran is ongoing, and occasionally the internal module file format is updated in an incompatible manner. If attempting to use a module file generated using another compiler, it most likely will not work properly. The GNU Fortran compiler is only compatible with module files compiled with the GNU Fortran compiler. mod extension, the compiler may occasionally issue errors about module file versions or unrecognized module file type. When using precompiled module files, normally ending with the. Once complete, press the “Ok” button in the Directories dialog. In the Directories dialog, select the “Include/Module Search Directories” tab, click the “Add…” button, and select the proper directory. To include a directory in the project as a module search directory, which is necessary for external modules, open the Directories dialog by click the “Search Directories…” button in the Project Options dialog. Instead, the external module file should be placed in a safe location. However, this folder is emptied each time a clean operation is requested. During the build process, Simply Fortran will construct a module directory within the project’s containing directory by default. If one is attempting to include a modern Fortran library that ships with a module file, Simply Fortran must be instructed as to where to find the module file. In the example above, notice that the “lib” prefix was excluded because GNU Fortran implicitly assigns this to the beginning of the library name. For example, if the library file were named libblas.a, enter the following: Next, in the Project Options dialog, add the desired library via a linker flag. Click the “Add…” button and select the containing directory from the dialog.Īfter adding the library’s directory to the list, press the “Ok” button. In the Directories dialog, select the “Library Directories” tab. From the Project Options dialog, accessible by right-clicking the project tree and selecting “Options,” click the “Search Directories…” button. To include a library via compiler flags, the library’s directory must be added to the list of library search directories. Libraries can also be included using compiler flags. Libraries are binary files and cannot be edited in Simply Fortran. The library file should now be in the project. First, right-click on the project tree in the Project Pane and select “Add File(s)…” Using the file selection dialog, navigate to the library file for inclusion generally speaking, the file should have a. This process is identical to adding a source file to a project. The first technique involves adding a library file directly to a Simply Fortran project. Each method offers advantages, which are explained below. Simply Fortran can handle the mechanics of linking to external libraries using two techniques. Purchasing and Activating Simply Fortran.
0 Comments
Leave a Reply. |