[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: private/public key support ?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 15 Mar 2010 22:11:04 -0300
> On Mon, Mar 15, 2010 at 4:33 PM, Valerio Schiavoni
> <valerio.schiavoni@gmail.com> wrote:
> > Hello Luiz,
> > trying to build lmd5, i get this:
> >
> > gcc -I/Users/veleno/Downloads/lua-5.1.4/src -DUSE_SHA1_OPENSSL -O2
> > -c -o lmd5.o lmd5.c
>
> There are no refs to the lua library in your link line.
None is needed. (At least not in Linux or Mac OS X.)
But the correct command line for SHA1 is
make DEFS=-DUSE_SHA1_OPENSSL MD5LIB=-lcrypto MYNAME=sha1
% make DEFS=-DUSE_SHA1_OPENSSL MD5LIB=-lcrypto MYNAME=sha1
gcc -I/tmp/lhf/lua-5.1.4/src -DUSE_SHA1_OPENSSL -O2 -c -o lsha1.o lsha1.c
gcc -o sha1.so -shared lsha1.o -lcrypto
/tmp/lhf/lua-5.1.4/src/lua -lsha1 test.lua
sha1 library for Lua 5.1 / Jan 2010 / using openssl
...
If you're running Mac OS X then you need this is the link step:
env MACOSX_DEPLOYMENT_TARGET=10.3 gcc -o sha1.so -bundle -undefined dynamic_lookup lsha1.o -lcrypto