Re: Load a shared library using gcc/Cygwin

2005-07-05 Thread Brian Dessent
Yu-Cheng Chou wrote: > int main(){ >void *handle; >int (*fp)(); >char *modname = "./module.dll"; >HMODULE h; >void (*init)(); > printf("hello1\n"); >h = LoadLibrary("cygwin1.dll"); > printf("hello1 h = %p\n", h); >init = ( void (*)())GetProcAddress(h, "cygwin_dll_init"

Load a shared library using gcc/Cygwin

2005-07-05 Thread Yu-Cheng Chou
Hi, main.c below is for loading the shared library module.dll /* command to create main.exe cl -c main.c link main.obj */ #include #include int main(){ void *handle; int (*fp)(); char *modname = "./module.dll"; HMODULE h; void (*init)(); printf("hello1\