On Thu, Apr 9, 2009 at 9:13 AM, Steffen Mueller <smuel...@cpan.org> wrote: > Memo Garcia wrote: >> cc main.o my_par_pl.o -s -Wl,-E -L/usr/local/lib >> -L/usr/lib/perl/5.10/CORE -lperl -ldl -lm -lpthread -lc -lcrypt -o ./par >> /usr/bin/ld: cannot find -lperl > The solution to your problem is probably to install a missing package. > It's strange that it's failing during linking. I'd expect it to be > missing perl headers. Right now, I have no Ubuntu to check, but have a > look at the base perl packages that aren't installed. You definitely > need libperl-dev or so.
Steffen is correct, you need to install package libperl-dev on Ubuntu or Debian. In general, reasons for "cannot find -lperl" can be: - Your perl executable (e.g. /usr/bin/perl) was linked statically, hence there might no libperl.a or libperl.so on your system at all (unless you install some "perl development" package) - Your perl executable _was_ linked dynamically, but the shared library is called something like /usr/lib/libperl.so.5.10 (i.e. the internal name of the shared library is used as the filename) - this is standard practise on modern *nix systems. In this setup, you would use a symlink /usr/lib/libperl.so -> /usr/lib/libperl.so.5.10 to link against this shared library (corresponding argument for the linker is the above "-lperl"). Since this symlink is needed for development only, it might also be in a separate "perl development" package Cheers, Roderich