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.

Problem to link C and Fortran files

bilel
Beginner
590 Views
Hello
I have a program which is written in C and fortran 90. I succeed to compile it and to run it on an alpha Compac machine, using fortran90 and cc from compac. But I 'm trying to do it in another machine with intel fortran ifort and gcc, but I have an error for linking
/usr/bin/ld: cannot find -lUfor
here is the command i use to link:
F90LIBS= -L/opt/intel_fc_80/lib/for_main.o -lUfor -lfor -lFutil -lots3
thank you for your help
0 Kudos
1 Reply
Lorri_M_Intel
Employee
590 Views

The names of the libraries are quite different between Compaq Fortran and Intel Fortran. libUfor and libfor are Compaq Fortran library names, that's why you can't find them with your existing command.

It might be easier for you to try using "ifort" to link your application. This is not the makefile version, of course, but if you effectively did this:

icc -cmyCfile.c

ifort -c myFfile.f

ifort -o myexe myCfile.o myFfile.o

It (should!) all just work.

- Lorri

0 Kudos
Reply