1 |
I'm trying to compile some C code that uses OpenMP. I've compiled |
2 |
gcc-4.2.0 with the openmp USE flag |
3 |
in OS X 10.4.10. I've selected it with gcc-config (and re-sourced ~/ |
4 |
Library/Gentoo/etc/profile) |
5 |
|
6 |
> $ gcc-config -l |
7 |
> [1] i686-apple-darwin8-4.0.1 |
8 |
> [2] i686-apple-darwin8-4.2.0 * |
9 |
|
10 |
But when I try to run code compiled with |
11 |
|
12 |
CFLAGS=-O3 -ansi -march=prescott -Wall -DNOSHORTS -DUSEGETTIME - |
13 |
DUSEOPENMP -fopenmp -I../include |
14 |
LDFLAGS=-L../lib -lsdp -framework Accelerate -lgomp -lm |
15 |
|
16 |
I get an error about not being able to load the library |
17 |
|
18 |
> $ make |
19 |
> ... |
20 |
> $ cd test; make |
21 |
> ../solver/csdp theta1.dat-s >theta1.out |
22 |
> dyld: Library not loaded: /Users/wilson/Library/Gentoo/usr/lib/ |
23 |
> libgomp.1.dylib |
24 |
> Referenced from: /Users/wilson/Documents/Work/csdp/test/../solver/ |
25 |
> csdp |
26 |
> Reason: image not found |
27 |
> make: *** [theta1.out] Error 133 |
28 |
|
29 |
The library it's looking for is in the correct place, just not where |
30 |
my code is looking. |
31 |
|
32 |
> $ locate libgomp.1.dylib |
33 |
> /Users/wilson/Library/Gentoo/usr/lib/gcc/i686-apple-darwin8/4.2.0/ |
34 |
> libgomp.1.dylib |
35 |
> $ gcc-config -L |
36 |
> /Users/wilson/Library/Gentoo/usr/lib/gcc/i686-apple-darwin8/4.2.0 |
37 |
|
38 |
Thanks, |
39 |
Aaron |
40 |
|
41 |
P.S. |
42 |
|
43 |
I'm new to C programming and hope that this isn't just my fault. I |
44 |
tried setting LD_LIBRARY_PATH with no effect. |
45 |
-- |
46 |
gentoo-alt@g.o mailing list |