Re: Adding a library

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux