delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/07/28/07:57:18

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL,BAYES_00
X-Spam-Check-By: sourceware.org
Cc: cygwin AT cygwin DOT com
Message-Id: <1A893AE0-D577-4897-A939-B5A74B5C4887@uni-dortmund.de>
From: Georg Troska <georg DOT troska AT uni-dortmund DOT de>
To: Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com>
In-Reply-To: <5D074DD3-FF46-44EF-B015-59531A8D8DC3@uni-dortmund.de>
Mime-Version: 1.0 (Apple Message framework v935.3)
Subject: Re: mingw headers and libraries missing
Date: Tue, 28 Jul 2009 13:56:49 +0200
References: <5FE114CB-1BD5-450B-BE50-27D7D665CB7D AT uni-dortmund DOT de> <416096c60907271220x50eaca35nc454c41ad6a92d76 AT mail DOT gmail DOT com> <416096c60907271229n1f87acd0ha410da5dc8c51d54 AT mail DOT gmail DOT com> <C60F7B43-C1F9-444D-9DA6-DF664FF3FC27 AT uni-dortmund DOT de> <4A6ECECC DOT 7030404 AT gmail DOT com> <5D074DD3-FF46-44EF-B015-59531A8D8DC3 AT uni-dortmund DOT de>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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

Hi Dave,

the dependency was a bug of my own.

I tried linked against pthread...

now the my dll does not depend on cygwin1.dll anymore

Thanks a lot for your help
Georg
Am 28.07.2009 um 12:56 schrieb Georg Troska:

> Hi,
> this information was very usefull to me. Thank you very much.
>
> My plan is to build a dll with cygwin, that does not depend on  
> cygwin1.dll.
> unfortunatelly my library is build now (that is great) but it still  
> depends on cygwin1.dll (I have done objdump -P .. | grep dll)
>
> Is it possible that the w32api-winsock library depends on this as  
> well? I do not understand where this dependency comes from
>
> Thank you very much
> Am 28.07.2009 um 12:11 schrieb Dave Korn:
>
>> Georg Troska wrote:
>>> hi,
>>> thank you very much for this information
>>>
>>> Where o I find windsock.h and its library? Do I need a SDK (e.g.  
>>> Visual
>>> C++) for this?
>>
>> Nope, you need the w32api package (you should probably already have  
>> it),
>> this works for both cygwin and mingw compiles and provides headers in
>> /usr/include/w32api and libraries in /usr/lib/w32api that let you  
>> use all the
>> standard windows OS functions.  The file you're looking for is
>> /usr/include/w32api/winsock2.h (plain 'winsock.h' only gives the  
>> old V1
>> windows socket interface, nobody uses it any more), and the library  
>> is
>> /usr/lib/w32api/libws2_32.a, the -I and -L options for the compiler  
>> should
>> already be set up correctly so you just write "#include  
>> <winsock2.h>" in your
>> C source and add '-lws2_32' to the compiler command line and away  
>> you go.
>>
>> Note that you only want this as long as you're using -mno-cygwin;  
>> if you
>> decide to write a Cygwin application, you just use the standard  
>> POSIX socket
>> functions and don't use winsock2.h or libws2_32.a, and the Cygwin  
>> DLL takes
>> care of the rest for you.  (It is even possible to write a Cygwin  
>> app that
>> bypasses the Cygwin DLL POSIX socket functions and uses the winsock  
>> API
>> directly, but it's not a standard thing to do and fraught with  
>> possibilities
>> for bugs to arise, so I'd recommend against it.)
>>
>>   cheers,
>>     DaveK
>>
>> --
>> Problem reports:       http://cygwin.com/problems.html
>> FAQ:                   http://cygwin.com/faq/
>> Documentation:         http://cygwin.com/docs.html
>> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>>
>


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

- Raw text -


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