This is the mail archive of the
mailing list for the Cygwin project.
Re: How to Create Static library or dll file not depending on cygwin's dll
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: cxf <chenxiaof at is dot iscas dot ac dot cn>
- Cc: cygwin at cygwin dot com
- Date: Thu, 22 Jun 2006 10:20:48 -0400 (EDT)
- Subject: Re: How to Create Static library or dll file not depending on cygwin's dll
- References: <000301c695d2$6d70fd30$ab01a8c0@loiscxf>
- Reply-to: 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.
|\ _,,,---,,_ email@example.com | firstname.lastname@example.org
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