Page 1 of 1

compiling problem

Posted: Sun Aug 02, 2015 7:45 pm
by rogerh
New (potential) user here.

I have a fortran program which uses an external module. When I try to compile the module I get an error saying it already exists which isn't true.

I don't see any way to link the program to the module unless it happens automatically.

I need to increase the font size but the help file says options > font size and there isn't such a choice on the menu.

Roger

Re: compiling problem

Posted: Sun Aug 02, 2015 8:19 pm
by rogerh
I found the font control so that's ok now.

Roger

Re: compiling problem

Posted: Sun Aug 02, 2015 8:24 pm
by rogerh
The compile error is this which is not much help to me at least

c:/program files/gfortran/bin/../lib/gcc/mingw32/4.10.0/../../../libmingw32.a(main.o): In function `main':
e:\p\giaw\src\pkg\mingwrt-4.0.3-1-mingw32-src\bld/../mingwrt-4.0.3-1-mingw32-src/src/libcrt/crt/main.c:91: undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status

Roger

Re: compiling problem

Posted: Mon Aug 03, 2015 9:45 am
by jussij
Hi Roger,
The compile error is this which is not much help to me at least
I'm no expert in FORTRAN but from the error message this does look like a linker issue:

Code: Select all

undefined reference to `WinMain@16'
To me that looks like the WinMain function was not found by the linker.
I don't see any way to link the program to the module unless it happens automatically.
The default command line defined for the FORTRAN document type is setup to take a single file and create an executable from that file and this is generally true of most of the Zeus document types.

For example the C#, C/C++ and Go document types all have similar configurations.

So there is no special FORTRAN only settings in Zeus to let you do this configuration.

But since it is always possible to run the FORTRAN compiler from the command line and have it do just this, that means the same configuration could be configured and run from inside Zeus.

So the question is how would you run the gfortran compiler if you was doing this from the command line. What would that command line look like :?:

How do you normally run your builds :?:

Do use use a make file or a build tool or just a batch file :?:

Cheers Jussi