Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29252 Discussions

Link problem :undefined reference to main

pyrrhias
Beginner
473 Views
I try to link with ifort and I obtain the following problem.

ifort clq -shared-intel -nofor-main libpass2.a pass2lib.o sysdep.o models.o
/usr/lib/gcc/i486-linux-gnu/4.2.3/../../../../lib/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'

Have you an idea how to solve this problem.

My config is:
X86
unbuntu 8.04
gcc 4.2

Thanks
0 Kudos
1 Reply
Steven_L_Intel1
Employee
473 Views
You've used -nofor_main which says that the main program is not in Fortran (usually C or C++). Do you have such a thing among the objects you linked?
0 Kudos
Reply