Silverfrost Forums

Welcome to our forums

Problems with FUNCTON

13 Nov 2014 8:29 #15064

Hi i need help, when i make a subroutine function it does not work whit my main program and the error showed is the next:

1.- when i compiling the main show: Compiling and linking file: YinaPrinc.f95 WARNING the following symbols are missing: MROOTTDAP C:\Users\Dell\Documents\Donald\Programas fortran\Programa Yina\lgotemp@.obj (C:\USERS\DELL\DOCUMENTS\DONALD\PROGRAMAS FORTRAN\PROGRAMA YINA\YINAPRINC.F95) Creating executable: C:\Users\Dell\Documents\Donald\Programas fortran\Programa Yina\YinaPrinc.EXE Compilation and linking completed.

2 when i compiling the function:

Compiling and linking file: AREA.f95 *** No main, WinMain or LibMain function *** Compilation abandoned Compilation failed.

i dont now what i need do it to run.

14 Nov 2014 11:59 #15066

Hard to tell without seeing the code. Could be anything.

Are you using modules? If not, have you declared your function's type in the main program?

e.g. if the function is REAL you need the following in your main program.

REAL MROOTTDAP

If this doesn't help can you post some code.

30 Nov 2014 11:20 #15166

Donald,

It looks to me that your main program routine is in the first file, and the missing subroutine is in the second file.

If you are compiling by issuing the commands manually, then you need to compile them without linking, i.e. using the token -c (for compile only):

FTN95 -c YinaPrinc
FTN95 -c Area

and then link with SLINK, as in:

SLINK YinaPrinc.obj Area.obj Yina

(Would create Yina.exe)

If you are using Plato, then you have to include both source code files in your project.

I think from what you posted you are trying to compile AND link each file separately.

Eddie

Please login to reply.