delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/06/22/10:21:04

X-Spam-Check-By: sourceware.org
Date: Thu, 22 Jun 2006 10:20:48 -0400 (EDT)
From: Igor Peshansky <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cxf <chenxiaof AT is DOT iscas DOT ac DOT cn>
cc: cygwin AT cygwin DOT com
Subject: Re: How to Create Static library or dll file not depending on cygwin's dll
In-Reply-To: <000301c695d2$6d70fd30$ab01a8c0@loiscxf>
Message-ID: <Pine.GSO.4.63.0606221018250.10500@access1.cims.nyu.edu>
References: <000301c695d2$6d70fd30$ab01a8c0 AT loiscxf>
MIME-Version: 1.0
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Thu, 22 Jun 2006, cxf wrote:

> I have a source file "crypto.c",in this file I use the functions which in
> openssl library.
> So I compile the file with the following command
> gcc -c crypto.c
> gcc -shared -mno-cygwin -o crypto.dll crypto.o -lcrypto
>
> But the compiled dll file "crypto.dll" depends on the
> cygcrypto-0.9.8.dll, can I have any methods compile a dll file not
> depending on the cygcrypto-0.9.8.dll.

If you build a Cygwin static or shared library, it will depend on Cygwin
(not surprisingly).  If you need to build a non-Cygwin library, your best
alternative would be MinGW (see my other message), but that may involve
some porting effort on your part.

> Another question:
> I want compile the static library,so using the following command :
> gcc -c crypto.c
> gcc -static -o crypto.lib crypto.o -lcrypto.
>
> That will give a error. how to compile the static library?

<http://cygwin.com/acronyms/#STFW>.  The first result returned by Google
for "gcc static library" gives detailed instructions on how to do that.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_	    pechtcha AT cs DOT nyu DOT edu | igor AT watson DOT ibm DOT com
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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