Subject: Re: Building SSL dll - please help
From: [email-masked] (Mumit Khan)

27 Sep 1998 21:41:12 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
To: Jan Tomasek <[email-masked]>
Cc: "[email-masked]" <[email-masked]>

On Sun, 27 Sep 1998, Jan Tomasek wrote:

> 
> Here is part of my make:
> 
> libeaydll:
> 	ld -s --base-file libeay.dll.base --dll -o libeay.dll libcrypto.a libssl.a libRSAglue.a -e startup@12
> 	echo EXPORTS > libeay.dll.def
> 	nm libcrypto.a | grep '^........ [T] _' | sed 's/[^_]*_/	/' >>libeay.dll.def
> 	dlltool --as=as -dllname libeay.dll --def libeay.dll.def --base-file libeay.dll.base --output-exp libeay.dll.exp 
> 	ld -s --base-file libeay.dll.base libeay.dll.exp --dll -o libeay.dll libcrypto.a libssl.a libRSAglue.a
> 
> I'm receiving this errors:

You need to add -lcygwin to your libraries when linking. Fyi, there are
two better ways to create DLLs:
  
  1. use 'gcc' (or 'c++' or 'g77' depending on the language you're using)
     instead of 'ld' so that essential libraries are automatically added.
     Note that your particular case does not build a relocatable DLL.
  
libeaydll:
	gcc -s -Wl,--base-file,libeay.dll.base -Wl,--dll -o libeay.dll \
	  libcrypto.a libssl.a libRSAglue.a -Wl,-e,startup@12
 	echo EXPORTS > libeay.dll.def
 	nm libcrypto.a | grep '^........ [T] _' | \
	  sed 's/[^_]*_/	/' >>libeay.dll.def
 	dlltool --as=as -dllname libeay.dll --def libeay.dll.def \
	  --base-file libeay.dll.base --output-exp libeay.dll.exp 
 	gcc -s -Wl,--base-file,libeay.dll.base libeay.dll.exp -Wl,--dll \
	  -o libeay.dll libcrypto.a libssl.a libRSAglue.a

  2. use my dllhelpers package, specificaly the tool called dllwrap, that
     does all this for you with a single command line. It's included in
     my egcs-1.1 binary distribution; for older releases, you can get the
     tools and examples at:
       
       http://www.xraylith.wisc.edu/~khan/software/gnu-win32/
    
     and look for "Building DLLs with EGCS" menu item.

Regards,
Mumit

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".