Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

undefined refference to "MAIN"

nmadani
Beginner
487 Views

Hi everybody,I use ifort for linux;

While compiling some subroutins and programs I receive such a message: in ......... undefined refference to "MAIN" .

Aparently they are compiled.But in running the program I receive following message and running stops:

11 November 2008 , time 14:04 , starting LMTART

PROJECT? LaTiO3
INPINFO? ini+str+scs
RUNMODE? scf+out
LaTiO3.out DELETED !
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image PC Routine Line Source
a.out 08287329 Unknown Unknown Unknown
. FFFFE600 Unknown Unknown Unknown
a.out 081F892E Unknown Unknown Unknown
libc.so.6 00562DEC Unknown Unknown Unknown
a.out 0804A1E1 Unknown Unknown Unknown
[madani@localhost lmtart]$

can these 2 be related to eachother?

0 Kudos
1 Reply
TimP
Honored Contributor III
487 Views
Quoting - nmadani

While compiling some subroutins and programs I receive such a message: in ......... undefined refference to "MAIN" .

Aparently they are compiled.But in running the program I receive following message and running stops:
forrtl: severe (174): SIGSEGV, segmentation fault occurred
can these 2 be related to eachother?

Yes, in an all Fortran build there must be a main program, the one with PROGRAM (or, up to 30 years ago, no FUNCTION or SUBROUTINE, just blank) at the top. That's where the system library hands over control to your code.

0 Kudos
Reply