Page 1 of 1

ld: symbol(s) not found for architecture x86_64

PostPosted: Wed Nov 18, 2015 4:39 am
by leo1977
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

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

PostPosted: Sat Nov 21, 2015 1:14 am
by admin
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