Re: error: cannot find -lXpm. But libXpm is in /usr/lib

From: Rick Brownrigg <brownrig_at_nyahnyahspammersnyahnyah>
Date: Thu Mar 18 2010 - 09:28:23 MDT

Hi,

Assuming your system is a linux machine, the linker typically looks
for libraries with a suffix of either ".a" or ".so". Notice that your
libraries are not named in that fashion; there's versioning suffixes
*after* the ".so".

I've recently encountered this situation on an Ubuntu system, and I
don't understand the reasoning behind such a naming convention . Given
that, I'm not sure what the "proper" solution is. The man page for ld
indicates you might be able to replace "-lXpm" with "-l:libXpm.so.
4" (note the colon). Alternatively, creating a symlink named "libXpm.
4.so", pointing to "libXpm.so.4" might do the trick, but this likely
subverts the intent behind such naming, and may not be generally
advised.

Rick

On Mar 17, 2010, at 9:28 PM, brick wrote:

> Hi
> When I compiler ncl with icc and ifort, it always appear the error:
> "cannot find -lXpm". Such like:
>
> ifort -O2 -o tdpackdemo TdpackDemo.o -L../../../.././ncarg2d/src/
> libncarg -lncarg -L../../../.././ncarg2d/src/libncarg_gks -
> lncarg_gks -L../../../.././common/src/libncarg_c -lncarg_c -lpng -
> lz -L/mnt/home/xqiu/Program/IntelCompiled/Ncl_ncarg-5.1.1/lib -L/
> usr/lib -L/usr/lib/X11 -L/mnt/home/xqiu/Program/IntelCompiled/lib -
> lXpm -lX11 -lXext
> ld: cannot find -lXpm
>
> But the libXpm is in /usr/lib
> /usr/lib/libXpm.so.4
> /usr/lib/libXpm.so.4.11.0
>
> I don't know why it can't be found by the compiler? Does anyone know
> it?
> Thanks!
>
> brick
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Mar 18 09:28:31 2010

This archive was generated by hypermail 2.1.8 : Fri Mar 19 2010 - 16:19:08 MDT