ld: symbol(s) not found for architecture x86_64

Post here if you have a question about linking your program with LAPACK or ScaLAPACK library

ld: symbol(s) not found for architecture x86_64

Postby leo1977 » Wed Nov 18, 2015 4:39 am

Hi,

I'm new to the forum and am trying to test SCALAPACK with example1.f http://www.netlib.org/scalapack/examples/example1.f.

I downloaded and installed SCALAPACK 2.0.2 and compiled just with 'make' without any problems.
I have MPICH 3.1.4 installed and my machine is running Mac OS X Lion 10.7.5. I also have gfortran installed.

I tried to compile example.f as follows:

mpif90 -c example1.f
mpif90 -o example1.o libscalapack.a


I get the following error:

Undefined symbols for architecture x86_64:
"_main", referenced from:
start in crt1.10.6.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status


Can anybody give me a hint?

Thanks in advance!

Leo
leo1977
 
Posts: 1
Joined: Wed Nov 18, 2015 4:27 am

Re: ld: symbol(s) not found for architecture x86_64

Postby admin » Sat Nov 21, 2015 1:14 am

Best is to use the ScaLAPACK installer to get your libraries
then
mpif90 -c example1.f
mpif90 -o example1.exe example1.o -L /$PATH_TO_SCALAPACK_INSTALLER/install/lib -lscalapack -lreflapack -lrefblas
admin
Site Admin
 
Posts: 608
Joined: Wed Dec 08, 2004 7:07 pm


Return to Linking Problem

Who is online

Users browsing this forum: No registered users and 2 guests