On Wed, 10 Jul 2002, Melinda Taylor wrote: > This is probably a sily question but I keep getting X11 and pgplot errors > when compiling things like: > > /usr/bin/ld: cannot find -lX11 > collect2: ld returned 1 exit status > make[1]: *** [sm] Error 1
-L/usr/X11R6/lib > /usr/bin/ld: cannot find -lpgplot -L/usr/local/pgplot[/lib] Depending on whether pgplot is installed sensibly or conglomerately. > If I check /etc/ld.so.conf: This is only consulted when the dynamic loader goes to load and execute a program. GCC doesn't look at it, and expects you to put the appropriate bits and pieces in, as shown above. > ldconfig -v | grep pgplot > ldconfig: Path `/sw/pgplot' given more than once > /usr/local/pgplot: > libpgplot.so -> libpgplot.so AAAAAAAARRRGH! Oh, the humanity! <twitch>Versioning...</twitch> Have these people never heard of versioning their shared libraries? Ugh. As you can tell, that's bad. Dynamically linked objects should always be versioned to prevent API changes from rearing up and biting application developers squarely in the butt. > Doesn't this mean any -lpgplot calls should work? No. GCC doesn't use the dynamic loader's configuration, it wants to know about the location of libraries itself, in it's own way. The lines I gave up the top should sort you out in that regard. -- ----------------------------------------------------------------------- #include <disclaimer.h> Matthew Palmer, Geek In Residence http://ieee.uow.edu.au/~mjp16 -- SLUG - Sydney Linux User's Group - http://slug.org.au/ More Info: http://lists.slug.org.au/listinfo/slug
