public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ingo Krabbe <ikrabbe.ask@web.de>
To: gcc-help@gcc.gnu.org
Cc: "Vivek Katakam" <vivek1717@gmail.com>
Subject: Re: Adding a library
Date: Tue, 20 Jun 2006 04:41:00 -0000	[thread overview]
Message-ID: <200606200640.54460.ikrabbe.ask@web.de> (raw)
In-Reply-To: <d0e0ce060606191959u601dd0d8pe0f990444d400672@mail.gmail.com>

Am Dienstag, 20. Juni 2006 04:59 schrieb Vivek Katakam:
> Hi All,
> I have a problem at Linker stage in the compilation process.
>
> If I include libsqlplus.so as -lsqlplus it is generating the binary
> otherwise it is the giving undefined reference to sqlca function.
>
> I have also given the LD_LIBRARY_PATH etc. Because I have to change at
> lot number of places , is there a way around so that i can dynamically
> include this library for example through ranlib.


have you tried -Wl,-rpath,[PATH TO libsqlplus] as a LDFLAG while linking ?  
Then you don't need to set LD_LIBRARY_PATH in your environment, but the 
binary will know on its own how to find the library.  You have to think twice 
about this topic, when you want to enable others to use your project to make 
the executables.  In general, all linker options are accesible through 
gcc's -Wl flag followed by the linker flag.

>
> Regards,
> Vivek

      reply	other threads:[~2006-06-20  4:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-20  3:00 Vivek Katakam
2006-06-20  4:41 ` Ingo Krabbe [this message]

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=200606200640.54460.ikrabbe.ask@web.de \
    --to=ikrabbe.ask@web.de \
    --cc=gcc-help@gcc.gnu.org \
    --cc=vivek1717@gmail.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).