public inbox for gentoo-amd64@lists.gentoo.org
 help / color / mirror / Atom feed
From: Branko Badrljica <brankob@avtomatika.com>
To: gentoo-amd64@lists.gentoo.org
Subject: [gentoo-amd64] Curious thing- linking against .so libs...
Date: Wed, 10 Dec 2008 09:21:16 +0100	[thread overview]
Message-ID: <493F7BFC.4030503@avtomatika.com> (raw)

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 ?



             reply	other threads:[~2008-12-10  7:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10  8:21 Branko Badrljica [this message]
2008-12-10  7:57 ` [gentoo-amd64] Re: Curious thing- linking against .so libs Nikos Chantziaras
2008-12-10  9:05   ` Duncan
2008-12-10 11:29   ` Branko Badrljica

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493F7BFC.4030503@avtomatika.com \
    --to=brankob@avtomatika.com \
    --cc=gentoo-amd64@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox