This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Help, How can I use gcc to compile into dll file?
- From: "rudolf" <rudolf at meetexpo dot net>
- To: "cygwin" <cygwin at cygwin dot com>
- Date: Mon, 14 Jun 2004 09:20:34 +0800
- Subject: Help, How can I use gcc to compile into dll file?
- Reply-to: rudolf at meetexpo dot net
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/