Re: md5 problems

2004-11-25 Thread Tarc
On Fri, Oct 15, 2004 at 11:31:50AM +0100, Xian wrote:
 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 problem is it won't compile giving:
 [EMAIL PROTECTED]:~/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.
You forget add the libmd with compilation (see manuals)
try
%g++ md5.cpp -o md5 -lmd
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


md5 problems

2004-10-15 Thread Xian
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 iostream
#include sys/types.h
#include md5.h

#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:
[EMAIL PROTECTED]:~/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: [EMAIL PROTECTED]

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]