vimsical
June 13th, 2014, 07:48 PM
I have these packages install:
$ apt-policy libatlas-{base-,}dev
libatlas-base-dev:
Installed: 3.8.4-3build1
Candidate: 3.8.4-3build1
Version table:
*** 3.8.4-3build1 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
libatlas-dev:
Installed: 3.8.4-3build1
Candidate: 3.8.4-3build1
Version table:
*** 3.8.4-3build1 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
and I am trying to compile this test program:
#include <atlas/clapack.h>
int main() {
int n = 2, m=3;
double a_v[] = {1, 4, 2, 3};
double b_v[] = {1, 2, 3, 4, 5, 6};
int status = clapack_dposv(CblasRowMajor, CblasUpper, n, m, a_v, n, b_v, n);
}
But I got a linker error:
gcc proto/atlas_test.c -o atlas_test -L/usr/lib/atlas-base/ -latlas -lcblas
/tmp/ccoG7mea.o: In function `main':
atlas_test.c:(.text+0xd3): undefined reference to `clapack_dposv'
collect2: ld returned 1 exit status
I tried to use nm to see where the symbol clapack_dposv in various library files in /usr/lib/atlas-base/, but they all seem to have no exported symbol. Any help and suggestion are appreciated.
$ apt-policy libatlas-{base-,}dev
libatlas-base-dev:
Installed: 3.8.4-3build1
Candidate: 3.8.4-3build1
Version table:
*** 3.8.4-3build1 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
libatlas-dev:
Installed: 3.8.4-3build1
Candidate: 3.8.4-3build1
Version table:
*** 3.8.4-3build1 0
500 http://us.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
100 /var/lib/dpkg/status
and I am trying to compile this test program:
#include <atlas/clapack.h>
int main() {
int n = 2, m=3;
double a_v[] = {1, 4, 2, 3};
double b_v[] = {1, 2, 3, 4, 5, 6};
int status = clapack_dposv(CblasRowMajor, CblasUpper, n, m, a_v, n, b_v, n);
}
But I got a linker error:
gcc proto/atlas_test.c -o atlas_test -L/usr/lib/atlas-base/ -latlas -lcblas
/tmp/ccoG7mea.o: In function `main':
atlas_test.c:(.text+0xd3): undefined reference to `clapack_dposv'
collect2: ld returned 1 exit status
I tried to use nm to see where the symbol clapack_dposv in various library files in /usr/lib/atlas-base/, but they all seem to have no exported symbol. Any help and suggestion are appreciated.