delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/09/27/21:41:12

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: Building SSL dll - please help
27 Sep 1998 21:41:12 -0700 :
Message-ID: <Pine.SUN.3.93.980927112152.6010C-100000.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <360E06B4 DOT A51DB5D0 AT fel DOT cvut DOT cz>
Mime-Version: 1.0
To: Jan Tomasek <xtomasej AT fel DOT cvut DOT cz>
Cc: "gnu-win32 AT cygnus DOT com" <gnu-win32 AT cygnus DOT com>

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 AT 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 AT 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
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019