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 Subject: Re: How to make DLLs in cygwin for MSVC and BCB From: Max Kaehn To: cygwin AT cygwin DOT com In-Reply-To: References: <42B9854D DOT DBC0BD AT dessent DOT net> Content-Type: text/plain Date: Wed, 22 Jun 2005 10:31:03 -0700 Message-Id: <1119461463.6224.11.camel@fulgurite> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On Wed, 2005-06-22 at 18:17 +0200, Patrick Rotsaert wrote: > Loading the cygwin1.dll dynamically is certainly an option. I tried it, > although I'm not quite sure how to make sure I have "4K of scratch space > at the bottom of the stack", like the faq says. > My test program crashes once cygwin_dll_init is called. :-(( You need cygwin 1.5.18, which hasn't been released yet, for this to work. Try the latest snapshot. Your program looks fine, though you should do all your argv processing before calling cygwin_dll_init(), because it will trash your argv and argc. If you look at the cygload utility (in cygwin CVS), it shows how to add a new entry point to your program that will put the 4K closer to the bottom of the stack. -- 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/