I was trying to install nVidia's CUDA SDK for toying with GPU as
computing tool, but I soon found out that I can't compile anything.
I always get error's like "can't find -lGL" etc from compiler. So I took
a look where LIBPATHetc were set and everything seemed fine.
After that, I tried with trivial "Hello world" test source. I tried to
compile it, linking it with libGL.so. Compile failed with familiar
"can't find...".
Then I tried to link it to another libraries I found in /usr/lib64. It
turns out that gcc wants to link to .a/.la files and completely seems to
ignore .so.
What gives ?
I have standard Gentoo config on Phenom system with typical desktop
setup. gcc is v-4.3.2.
Test case program:
#include <stdio.h>
void main ( int argc , char ** argv ) {
printf("Argc is %d, arg zero is %s and arg one is %s\n" , argc,
argv[0] , argv[1] );
};
Compile attempts that work fine:
gcc -O2 -m32 -march=barcelona -pipe -o tt tt.c
gcc -O2 -m32 -march=barcelona -pipe -L/usr/lib64 -lresolv -o tt tt.c (
resolv lib has .la and .so version )
One that fails:
gcc -O2 -m32 -march=barcelona -pipe -L/usr/lib64 -lgdgeda -o tt tt.c
(libgdgeda has just .so )
Any ideas ?