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 Message-Id: <200406140140.i5E1eFp20152@mail.meetexpo.net> Date: Mon, 14 Jun 2004 09:20:34 +0800 From: "rudolf" Reply-To: rudolf AT meetexpo DOT net To: "cygwin" Subject: Help, How can I use gcc to compile into dll file? Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.25.0.62; VDF 6.25.0.92 X-IsSubscribed: yes All. How can I use gcc to compile into dll file? The probem is below. 3) Create a file "my_crt0.c" with the following contents #include #include typedef int (*MainFunc) (int argc, char *argv[], char **env); void my_crt0 (MainFunc f) { cygwin_crt0(f); } 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. Rudolf -- 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/