delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/06/13/21:21:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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" <rudolf AT meetexpo DOT net>
Reply-To: rudolf AT meetexpo DOT net
To: "cygwin" <cygwin AT cygwin DOT com>
Subject: Help, How can I use gcc to compile into dll file?
Mime-Version: 1.0
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 <sys/cygwin.h>
#include <stdlib.h>

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019