Dave, Thanks for the response atleast.. I understand that anyboody would really laugh...when a dll is exposing symbols..but I can't link them!!!!
But thats true..probably because of the incompatibilities,linking would not be successfull at ALL!!!! I have got it SOLVED ....I made another DLL..and some crazy stuffs.. So Even I can laugh now...:)) Good that atleast I made you LAUGH !! Nothing is wrong anywhere.. Enjoy!! Nagamani -----Original Message----- From: Dave Korn [mailto:[EMAIL PROTECTED] Sent: 16 November 2004 18:47 To: [EMAIL PROTECTED] Subject: RE: URGENT HELP: How does a cygwin.dll by passes ws2_32.dll? > -----Original Message----- > From: cygwin-owner On Behalf Of Nagamani Veerappa > Sent: 16 November 2004 06:31 > Dear experts, > > I wonder how can a exe compiled using gcc on cygwin by passes > ws2_32.dll? > > Basically I have a windows program compiled using MSVC, need > to use socket > interfaces provided by cygwin... > I tried linking cygwin1.dll with MSVC, with the great help of > ALastair, who > had written tips (in this forum) to achieve that. Just because you've successfully linked two incompatible object files together doesn't mean that what you have is valid code. The symbols may match up but nothing guarantees the data structures, ABI, functionality, or anything else actually match up. > But it seems cygwin1.lib/cygwin1.dll doesnot seems to expose socket > interfaces.. " nm /bin/cygwin1.dll | grep sock " says you're wrong: here are just some of the symbols it finds 610d7128 T [EMAIL PROTECTED] 610d7298 T [EMAIL PROTECTED] 610d72b8 T [EMAIL PROTECTED] 610d7340 T [EMAIL PROTECTED] 610d7480 T [EMAIL PROTECTED] 610d74c0 T [EMAIL PROTECTED] 6104a6b0 T _socketpair ..etc etc. That looks a lot like it's "exposing socket interfaces" to me. > If I link with ws2_32.lib it links with ws2_32.dll .. > Which I don't want... So, let me get you clear: you're saying that if you link with ws2_32, it gets linked to ws2_32, and you don't want that? Well just don't do that then! > So please help, by answering how can I bypass ws2_32.dll? Simple. Just spend the next ten years writing your own POSIX compatibility dll that uses microsoft's runtime. It won't be open source, of course, because microsoft's runtime libraries aren't, but it will do what you want. Look. Either write a win32 program using MSVC, which is the compiler for writing win32 programs, (or indeed using gcc -mno-cygwin, which means you can't use cygwin functions), or write a POSIX program using gcc and cygwin library. Your question is a bit like saying "I use a tape recorder to make tape recordings and a camera to take photographs. How can I use my tape recorder to take photos?" cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/ ********************************************************************** The information contained in this email and any attachments is likely to be confidential and legally privileged, and is for the intended recipient named above only. Any copying, dissemination, disclosure of or use of this email or its attachments unless authorised by us is prohibited, except that you may forward this email and/or attachments to a third party on a strict "need to know" basis. If you have received this email in error, please notify us immediately by replying to the email or by calling +91-80-22297030. Please then delete this email and any full or partial copies of it. You as the intended recipient must be aware and accept that emailis not a totally secure communications medium. Although we have taken all reasonable steps to make sure this email and any attachments are free from viruses, we do not (to the extent permitted by law) accept any liability whatsoever for any virus infection and/or compromise of security caused by this email and any attachment. No contract may be formed or documents served by you on or with us by this email or any attachments unless expressly agreed otherwise by us. Any views expressed in this email or attachments by an individual are not necessarily those of UbiNetics India (Private) Limited. ********************************************************************** -- 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/