* Question regarding compiling modules
@ 2024-02-28 22:42 Ken Woolridge
2024-02-28 23:02 ` Steve Kargl
0 siblings, 1 reply; 2+ messages in thread
From: Ken Woolridge @ 2024-02-28 22:42 UTC (permalink / raw)
To: fortran
[-- Attachment #1: Type: text/plain, Size: 953 bytes --]
A little background: I have Intel's Fortran90 compiler which I used for years. However, I recently had to reinstall it and found that the key
was no longer valid. Intel did not have the decency to return my emails so I looked for another Fortran90 compiler.
I found something called FTN95 (British, I believe) but their linker couldn't find any assembler routines even though they were placed
in the library.
I am in the process of testing gfortran. However, when I compile a module called MOD_WIN_APIS containing interfaces to Microsoft
API functions I get the error:
Error: Derived type '{whatever}' at (1) is being used before it is defined
I have defined these types in another module named MOD_TYPES which is compiled prior to MOD_WIN_APIS.
MOD_WIN_APIS uses MOD_TYPES (with the statement "USE MOD_TYPES") prior to any interfaces being defined.
Why am I getting this error when the types are defined???
Thank you,
Ken
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Question regarding compiling modules
2024-02-28 22:42 Question regarding compiling modules Ken Woolridge
@ 2024-02-28 23:02 ` Steve Kargl
0 siblings, 0 replies; 2+ messages in thread
From: Steve Kargl @ 2024-02-28 23:02 UTC (permalink / raw)
To: Ken Woolridge; +Cc: fortran
On Wed, Feb 28, 2024 at 10:42:36PM +0000, Ken Woolridge wrote:
> A little background: I have Intel's Fortran90 compiler which
> I used for years. However, I recently had to reinstall it
> and found that the key was no longer valid. Intel did not
> have the decency to return my emails so I looked for another
> Fortran90 compiler.
Intel's OneApi is available for download and use without
a license key. This isn't the forum to discuss how to
go about getting a useable OneApi.
> I am in the process of testing gfortran. However, when I
> compile a module called MOD_WIN_APIS containing interfaces
> to Microsoft API functions I get the error:
>
> Error: Derived type '{whatever}' at (1) is being used before it is defined
>
> I have defined these types in another module named MOD_TYPES
> which is compiled prior to MOD_WIN_APIS. MOD_WIN_APIS uses MOD_TYPES
> (with the statement "USE MOD_TYPES") prior to any interfaces being defined.
>
> Why am I getting this error when the types are defined???
Stab in the dark. mod_types.mod is another directory. Try
adding the "-I. -I${path_to_mod_types.mod}" to your command line.
--
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-02-28 23:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 22:42 Question regarding compiling modules Ken Woolridge
2024-02-28 23:02 ` Steve Kargl
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).