It seems these "undefined reverence" things are really plaguing me. Now, i am writing a cryotographic prgram, and i am going to be implementing an MD5 hash, so i downloaded OpenSSH and installed it to ~/usr/local/ssl. Here is the command that is being executed, the errors, the filenames, and the makefile.
Errors:
Code:
$ g++ -I/home/ethereal/usr/local/ssl/include -L/home/et
hereal/usr/local/ssl/lib -a ~/usr/local/ssl/lib/libcrypto.a -lcrypto efcrypt.o -
o efcrypt
efcrypt.o: In function `main':
efcrypt.o(.text+0x2f): undefined reference to `MD5'
collect2: ld returned 1 exit status
the files: (you'll have to trust me about whats in ./include)
Code:
$ ls -lA ~/usr/local/ssl/include ~/usr/local/ssl/lib
/home/ethereal/usr/local/ssl/include:
total 4
drwxrwxr-x 2 ethereal ethereal 4096 May 9 22:55 openssl
/home/ethereal/usr/local/ssl/lib:
total 1868
-rw-r--r-- 1 ethereal ethereal 1641636 May 9 22:55 libcrypto.a
-rw-r--r-- 1 ethereal ethereal 255532 May 9 22:55 libssl.a
drwxrwxr-x 2 ethereal ethereal 4096 May 9 22:55 pkgconfig
makefile:
Code:
# Makefile for EFcrypt
CC = g++
CFLAGS = -I/home/ethereal/usr/local/ssl/include -L/home/ethereal/usr/local/ssl/lib -lcrypto
efcrypt : efcrypt.o
$(CC) $(CFLAGS) efcrypt.o -o efcrypt
efcrypt.o : efcrypt.cpp
$(CC) $(CFLAGS) -c efcrypt.cpp
clean :
rm -f *.o