This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Building SSL dll - please help


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]