Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Compiler

Status
Not open for further replies.

kom4tsu

Programmer
Aug 4, 2014
5
BR
Hi everyone,

I compile and execute my program and it says on the context menu.

collect2: ld returned 1 exit status

Anyone knows what it means???

Thank you,

Kom4tsu
 
It's error from the linker.
Maybe before this error you will find an error like undefined reference to proc_name
Search for the file where the proc_name is defined and include it into your compile+link command.
 
C:\Users\Komatsu\AppData\Local\Temp\ccwDhUZn.o: In function `aurora':
C:/Users/Komatsu/Desktop/Iniciação Científica/Programas Fortran/aurora3.f:10: undefined reference to `_gettim_'
C:/Users/Komatsu/Desktop/Iniciação Científica/Programas Fortran/aurora3.f:125: undefined reference to `_gettim_'
collect2: ld returned 1 exit status

 
You need to find out where the subroutine or function gettim is.
 
gettim is the subroutine from Intel Fortran compiler, which is not standard for other compilers:
(
If you don't use the Intel compiler you can try to write a wrapper for this function using standard fortran subroutine date_and_time as showed here:
 
I'm using Force 2.0
Thanks for your support mikrom =)
 
I thought the Force project died 10 years ago when the Brazilian guy who started it stopped maintaining it. Anyway, if I remember correctly, Force uses G77 or possibly G95/GFortran.
 
Anyway, it seems that you try to compile a program which was originally developed for intel fortran compiler with another fortran compiler. To make this possible, you need to replace all non standard intel specific functions with standard fortran functions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top