From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16062 invoked by alias); 7 Jun 2004 14:56:39 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 16040 invoked from network); 7 Jun 2004 14:56:37 -0000 Received: from unknown (HELO cgf.cx) (66.30.22.40) by sourceware.org with SMTP; 7 Jun 2004 14:56:37 -0000 Received: by cgf.cx (Postfix, from userid 201) id 1A3674003FC; Mon, 7 Jun 2004 10:56:37 -0400 (EDT) Date: Mon, 07 Jun 2004 14:56:00 -0000 From: Christopher Faylor To: cygwin@cygwin.com Subject: Re: Visual Studio linking Message-ID: <20040607145637.GB15068@coe.casa.cgf.cx> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <001801c4487e$dca77e20$78d96f83@robinson.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.1i X-SW-Source: 2004-06/txt/msg00277.txt.bz2 On Mon, Jun 07, 2004 at 03:38:21PM +0100, Alastair Growcott wrote: >Seriously, it is quite easy once you figure it out, and I am sure there >are plenty of people who helped write Cygwin who probably knew but >couldn't be bothered to tell me. Well, we are all just very mean. >It involves a couple of minor hacks. It would be nice if cygwin1.dll >could export the cygwin_crt0() function. > >Here is how you do it: > >1) Use the impdef program to generate a .def file for the cygwin1.dll >impdef cygwin1.dll > cygwin1.def A .def file is generated for cygwin when the DLL is built, actually. >4) Use gcc in a Cygwin prompt to build my_crt0.c into a DLL (e.g. >my_crt0.dll). Follow steps 1 and 2 to generate .def and .lib files for >the DLL. > >5) Download crt0.c from the cygwin website and include it in your >sources. Modify it to call my_crt0() instead of cygwin_crt0(). 5a) Modify the license of your program to the GNU General Public License, since your binary has now become GPLed, meaning that you must now offer the source code to your sources under the terms of the GPL. cgf -- 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/