Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm 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 X-Originating-IP: [203.94.167.77] X-Originating-Email: [arashp AT hotmail DOT com] X-Sender: arashp AT hotmail DOT com From: "Arash Partow" To: cygwin AT cygwin DOT com Subject: Re: problem with dll and stdout Date: Tue, 09 Dec 2003 23:39:56 +0000 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 09 Dec 2003 23:39:56.0550 (UTC) FILETIME=[C08B9A60:01C3BEAD] Hi, I think this is the unwritten rule of thumb for cygwin and incorporation of cygwin at compile time with other applications in win32 built with vendor products such as MS visual C++, Borland C++ builder, Borland Delphi etc... Rule: If you are using unix calls in your code you will not be able to link the dll made with cygwin into any of the above mentioned vendors. Possible Reasons: 1.) You need to initialize the cygwin1.dll which is accomplished via code injection into the exes built by gcc at linking, i have not seen ANY examples on the net of initializing the cygwin1.dll that actually WORK. 2.) Cygwin compiles libc methods against its own set of libraries, when compiling with the above mentioned vendors, they will also have their own versions of libc methods, hence a state of confusion and ambiguities arises and in some cases the linker will link the application but crash during runtime. What does this mean for you? if your cygwin compiled dll has code that uses: 1. Posix Threads and/or synchronization calls (mutexes, conditions etc...) 2. Unix style sockets 3. Unix style signaling 4. Unix style file IO other than that if your dll code does not contain any the above, and even though cygwin can still compile this "other" code you be compiling that code with the vendor that you currently are using. this is my opinion and acquired knowledge on things after spending about a week trying to interface a small backend compiled with cygwin to a delphi gui front-end. if i am wrong please tell me. Regards Arash Partow _________________________________________________________________ ninemsn Premium transforms your e-mail with colours, photos and animated text. Click here http://ninemsn.com.au/premium/landing.asp -- 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/