X-Spam-Check-By: sourceware.org Date: Thu, 22 Jun 2006 10:20:48 -0400 (EDT) From: Igor Peshansky Reply-To: cygwin AT cygwin DOT com To: cxf 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: References: <000301c695d2$6d70fd30$ab01a8c0 AT loiscxf> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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? . 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/