I get this error if I compile and link a source file without an actual
program, like:

subroutine x
    write(8,*) 'Boe'
end subroutine x

> gfortran x.f90

C:/Users/markus/gcc/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/bin/ld.exe:
C:/Users/markus/gcc/bin/../lib/gcc/x86_64-w64-mingw32/14.1.0/../../../../x86_64-w64-mingw32/lib/../lib/libmingw32.a(lib64_libmingw32_a-crt0_c.o):crt0_c.c:(.text.startup+0x2e):
undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status

Does this mimick your case?

Regards,

Arjen

Op ma 7 jul 2025 om 21:20 schreef Ken Woolridge <kwwoolri...@hotmail.com>:

> To whom it may concern,
>
> I am attempting to use gfortran.  I used the QuickStart installer to
> install it.  I tried the following:
>
> $ gfortran MOD_GID.F90
>
> and received an error about Winmain missing???
>
> What does this mean and how do I fix it?  (I come from Intel's Fortran
> compiler).\\Thanks,
> Ken
>
  • WinMain??? Ken Woolridge
    • Re: WinMain??? Arjen Markus

Reply via email to