- or download this
$ (perl -MConfig -e 'print $Config{cc}')
x86_64-linux-gnu-gcc$
- or download this
$ (perl -MExtUtils::Embed -e ccopts -e ldopts)
-Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-l
+inux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lc -lcrypt
-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pip
+e -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I
+/usr/lib/x86_64-linux-gnu/perl/5.26/CORE $
- or download this
$ locate EXTERN.h
/usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE/EXTERN.h
$
- or download this
$ pwd
/usr/lib/x86_64-linux-gnu/perl
$ ls -l 5.26*
lrwxrwxrwx 1 root root 6 Jul 18 2018 5.26 -> 5.26.1
- or download this
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
- or download this
Update the package index:
...
Install libperl-dev deb package:
# sudo apt-get install libperl-dev
- or download this
$ x86_64-linux-gnu-gcc perl_embed_argv_signal.c -Wl,-E -fstack-protec
+tor-strong -I/usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE -L/usr/local
+/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE -lperl -ldl -lm -l
+pthread -lc -lcrypt -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-
+strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL
+E_OFFSET_BITS=64 -o embedex
$ ls
...
100
./embedex : done.
$
- or download this
$ x86_64-linux-gnu-gcc 2.perl_embed_argv_signal.c -Wl,-E -fstack-prot
+ector-strong -I/usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE -L/usr/loc
+al/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26.1/CORE -lperl -ldl -lm
+-lpthread -lc -lcrypt -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fn
+o-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_F
+ILE_OFFSET_BITS=64 -o embedex2
$ ./embedex2 slithy toves wirr and wimbel
...
^CCaught your ctrl-c and exiting!
$