Linker can't find library (PyProlog setup)

Eric Worrall eworrall at netcomuk.co.uk
Sun Sep 29 18:45:47 CEST 2002


Robert Oschler wrote:
> 
> I'm having trouble getting gcc/ld to 'see' the existence of a known shared
> library.  I quadruple-checked and I do indeed have the files 'libtermcap.so'
> and 'libtermcap.a' in my '/usr/lib/termcap' directory.  'gcc' is being
> passed the following library directive '-ltermcap'.  I tried the following
> 'export' commands in my build script (the echoed results do indeed show
> /usr/lib/termcap being properly added to the respective environment
> variables):
> 
>     export LD_LIBRARY_PATH="/usr/lib/termcap:$LD_LIBRARY_PATH"
>     echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
>     # run gcc command here
> 
> and I also tried:
> 
>     export PATH="/usr/lib/termcap:$PATH"
>     echo "PATH=$PATH"
>     # run gcc command here
> 
> and lastly, both:
> 
>     export LD_LIBRARY_PATH="/usr/lib/termcap:$LD_LIBRARY_PATH"
>     export PATH="/usr/lib/termcap:$PATH"
>     # run gcc command here
> 
> In all three cases I still get a complaint from 'ld', 'cannot
> find -ltermcap'.  What am I doing wrong?
> 
> thx

Include the library path using the -L option:

gcc -L/usr/lib/termcap etc

Eric Worrall

-- 
You have just received an Etech Solution
For all your Linux requirements contact
eworrall at netcomuk.co.uk



More information about the Python-list mailing list