From owner-freebsd-questions@FreeBSD.ORG Fri Oct 15 10:32:28 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BA28A16A4CE for ; Fri, 15 Oct 2004 10:32:28 +0000 (GMT) Received: from ptb-relay01.plus.net (ptb-relay01.plus.net [212.159.14.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 57B3E43D39 for ; Fri, 15 Oct 2004 10:32:28 +0000 (GMT) (envelope-from ian@codepad.net) Received: from [80.229.159.44] (helo=hercules.codepad.net) by ptb-relay01.plus.net with esmtp (Exim) id 1CIPNq-000459-Rv for freebsd-questions@freebsd.org; Fri, 15 Oct 2004 10:32:26 +0000 From: Xian To: freebsd-questions@freebsd.org Date: Fri, 15 Oct 2004 11:31:50 +0100 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410151131.50690.ian@codepad.net> Subject: md5 problems X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2004 10:32:28 -0000 I am trying to compile a program using md5 and I had some problems. So I made a test program to see if I was using it properly, and it still doesn't work. The test program is: #include #include #include #define MAX_STR 100 using namespace std; typedef unsigned short int usi; int main() { unsigned char Str[MAX_STR]; cout << "Enter a string to md5:" << endl; cin.getline(Str, MAX_STR); char Result[33]; MD5Data(Str, MAX_STR, Result); cout << Result << endl; return 0; } The problem is it won't compile giving: [ian@hercules:~/devel] %g++ md5.cpp -o md5 /tmp/cc8WdTS0.o: In function `main': /tmp/cc8WdTS0.o(.text+0x57): undefined reference to `MD5Data' It looks like I am missing a .o file or something. I am reasonably new to C++ so any kind of help will be much appreciated. -- /Xian [call sign: 2E1IPS] [web site: www.codepad.net] [email: ian@codepad.net]