This is the mail archive of the cygwin 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]
Other format: [Raw text]

Re: How to Create Static library or dll file not depending on cygwin's dll

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.
      |\      _,,,---,,_ |
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:
Problem reports:

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