collect2: ld returned 1 exit status

Having problems running the WRF Preprocessing Sysmte (WPS)?

collect2: ld returned 1 exit status

Postby Jpv90 » Thu Nov 19, 2015 7:08 pm

Hi, I am learner in Fortran, so my purpose is to understand the WENO advection code, and following write a new code in Matlab or Python. I have got the Fortran code, but when running it, showing the follow error:
In the function 'MAIN__'
code_WENO.f: (text+0x804): reference 'time_' undefined
code_WENO.f: (text+0x2b94): reference 'time_' undefined
collect2: ld returned 1 exit status

I think the error could be in this code's part:

character*8 char_time,yc
open(3,file='1d_single.time')
open(101,file='1.err')
call TIME(char_time)
write(*,*) 'time' ,char_time
write(3,*) 'time: ', char_time
pi=4.0*atan(1.0)
cfl=0.4
tf=1.5/pi
eps=1.e-8
istop=0
md=4
n=80
dx=2.0/n

My OS is Ubuntu 14.

Thanks!!
Jpv90
 
Posts: 1
Joined: Wed Nov 18, 2015 8:40 pm

Re: collect2: ld returned 1 exit status

Postby kwthomas » Mon Nov 23, 2015 6:34 pm

Hi...

You are calling subroutine TIME, however, when the linker (ld) tries to build the program, it can't find anything called TIME. The compiler you are using may have a TIME subroutine in one of its libraries, however, the library may not be linked by default.
Kevin W. Thomas
Center for Analysis and Prediction of Storms
University of Oklahoma
kwthomas
 
Posts: 279
Joined: Thu Aug 07, 2008 6:53 pm


Return to Runtime Problems

Who is online

Users browsing this forum: No registered users and 2 guests

cron