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

ifort compiling error of a file - lmtart

ndsr
Beginner
698 Views
dear all,

i get the following error when compiling a file for my LMTO bassed package

ifort -cw mod_dimart.f

ifort: command line warning #10156: ignoring option '-c'; no argument required
/opt/intel/Compiler/11.1/069/lib/ia32/for_main.o: In function `main':
/export/users/nbtester/x86linux_nightly/branch-11_1/20100204_010000/libdev/frtl/src/libfor/for_main.c:(.text+0x4d): undefined reference to `MAIN__'

Please advice me

Regards
N D Senthil Ram
0 Kudos
3 Replies
Steven_L_Intel1
Employee
698 Views
-cw is not a valid option. You may want just -c , which says to compile only and do not link.
0 Kudos
ndsr
Beginner
698 Views
Earlier I've tried with -c alone it didn't work out but due to some error ihappenedto restart my pc but I got it alright
I got it successful
by the way how should i link all the *.o file to one main.exe file
0 Kudos
Steven_L_Intel1
Employee
698 Views
ifort -o main obj1.o obj2.o obj3.o

will do it, giving you an executable named "main". You can replace "main" with whatever you want. (.exe is usually a Windows thing.)

You can also combine the compile and link without using -c, like this:

ifort -o main file1.f90 file2.f90 file3.f90
0 Kudos
Reply