Не могу собрать казалось бы элементарную программу:
// hello.cpp
#include <stdio.h>
#include "crypt_blowfish-1.2/ow-crypt.h"
int main()
{
//puts("H3LLO!");
crypt(0, 0); // нули, просто для примера
return 0;
}
/tmp/ccct9dc3.o: In function `main':
hello.cpp:(.text+0xf): undefined reference to `crypt(char const*, char const*)'
collect2: error: ld returned 1 exit status
$ wget http://www.openwall.com/crypt/crypt_blowfish-1.2.tar.gz
$ tar -xvf crypt_blowfish-1.2.tar.gz
$ cd crypt_blowfish-1.2
$ make
gcc -c -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wundef -Wpointer-arith -O2 -fomit-frame-pointer -funroll-loops crypt_blowfish.c
gcc -c x86.S
gcc -c -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wundef -Wpointer-arith -O2 -fomit-frame-pointer -funroll-loops crypt_gensalt.c
gcc -c -W -Wall -Wbad-function-cast -Wcast-align -Wcast-qual -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wundef -Wpointer-arith -O2 -fomit-frame-pointer -funroll-loops wrapper.c
echo '.so man3/crypt.3' > crypt_r.3
echo '.so man3/crypt.3' > crypt_rn.3
echo '.so man3/crypt.3' > crypt_ra.3
echo '.so man3/crypt.3' > crypt_gensalt.3
echo '.so man3/crypt.3' > crypt_gensalt_rn.3
echo '.so man3/crypt.3' > crypt_gensalt_ra.3
$ ar rsv libcrypt_blowfish.a *.o
ar: creating libcrypt_blowfish.a
a - crypt_blowfish.o
a - crypt_gensalt.o
a - wrapper.o
a - x86.o