2 msgPreventing a biarch build
1 msgundefined reference to `__i686.get_pc_thunk.dx'
2 msgGCC compile issues
1 msgRe: MinGW build of gcc 4.1.1
4 msgLOTS of failures when making check for gfortran...
2 msgProblem regarding build and configure
2 msg32-bit memory models
2 msg'make check' errors when '--enable-languages=c,...
2 msgsizeof() return type ?
3 msgRe: !(fun) with tls
1 msgSegmentation faults with static linking
4 msg-O or -g on gcc linker frontend?
2 msgTAF tan FIFA 2006 Resimleri
2 msgMaximum Allocatable Dynamic Memory
2 msgDisabling Instruction scheduling
1 msgi686-unknown-winnt target not defined
2 msgnew asembler command for AVR port
4 msgxgcc unable to build libgcc under mingw
6 msgInstalling gcc

Adding a library
\ Vivek Katakam (20 Jun 2006)
. \ Ingo Krabbe (20 Jun 2006)

Subject:Re: Adding a library
Group:Gcc-help
From:Ingo Krabbe
Date:20 Jun 2006


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


© 2004-2008 readlist.com