The LAPACK forum has moved to https://github.com/Reference-LAPACK/lapack/discussions.

to compile my code

Open discussion regarding features, bugs, issues, vendors, etc.

to compile my code

Postby indir » Wed Oct 10, 2007 3:22 pm

Hi all,

I succesfully compile the lapack libraries and created "lapack_LINUX.a" and "blas_LINUX.a" using the gfortran compiler.

I am trying to compile a example code with,

gfortran -O2 -c example1.f -o example1.o ../lapack_LINUX.a ../blas_LINUX.a

the massage I got is,

gfortran: ../lapack_LINUX.a: linker input file unused because linking not done
gfortran: ../blas_LINUX.a: linker input file unused because linking not done

and it created a example1.o file. if I try to run it with ./example1.o , this is what I got,
./example1.o: Exec format error. Wrong Architecture.

could you please explain this to me. I would be greatful any help to run my code

Manori
indir
 
Posts: 3
Joined: Wed Oct 03, 2007 4:54 pm

Postby Julie » Wed Oct 10, 2007 3:35 pm

indor,

The compilation command should be:
Code: Select all
gfortran -O2 -c example1.f -o example1.o

It will create the example1.o file

The linking command should be
Code: Select all
 gfortran -O2 example1.o -o example1.exe ../lapack_LINUX.a ../blas_LINUX.a

It wil create the example1.exe

You can do both at the same time by typing:
Code: Select all
gfortran -O2 example1.f -o example1.exe ../lapack_LINUX.a ../blas_LINUX.a

Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 5 guests