*.o: file not recognized: File format not recognized

*.o: file not recognized: File format not recognized


I am using intel fortran 10.1.013.

Production of my *.o files is successfull.

But now, I am blocked at the generation of my shared library :

Command line: ifort -shared *.o -o libmylib.so

It returns the following error: *.o: file not recognized: File format not recognized

I am working on a 32 bits Linux RedHat 5.

But when I do a ifort -logo, it returns : Intel Fortran Compiler for applications running on Intel 64

Is the installation of fortran incorrect ? What can I do ?

Thanks for your answers


2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The command line shown is correct so that's not an issue.

The error is actually emitted by the linker and not the compiler and it relates to using a 64-bit capable compiler with a 32-bit capable linker.

First, ensure the 32-bit Intel Fortran compiler is installed. The 64-bit compiler installs under /opt/intel/fce. The 32-bit compiler installs under /opt/intel/fc. (Note the absence of "e" in the 32-bit case).

When setting up your environment to use the compiler, you need to execute:

source /opt/intel/fc/10.1.013/bin/ifortvars.sh (or.csh)

Since your using the 64-bit compiler, that says you source'd the ifortvars.sh (or .csh) from the "fce" area.

Hope that helps.

Leave a Comment

Please sign in to add a comment. Not a member? Join today