Cygwin built DLL invoked from MSC app doesn't seem to be all there.

Jon Wells
Tue May 25 08:00:00 GMT 1999

It's seems that only some bits of the cygwin API work inside a dll
invoked from a none cygwin applications.

Given the following....
---- server_body.c ----
#include <stdio.h>

int __declspec (dllexport)
Server_Init(void *interp)
  fprintf(stderr, "Hi there\n");
  return 1;

Built like...

  gcc -c -g   -o server_body.o server_body.c
  dllwrap --output-def server.def --add-stdcall-alias \
    -Wl,-e,__cygwin_noncygwin_dll_entry@12 --implib libserver.a \
    --driver-name gcc -o server.dll server_body.o 

If loaded from an off-the-shelf scriptics tclsh80 (8.05 I think) with
`load server.dll server' the sleep(20) doesn't.

The fprintf works, sleep() and other stuff doesn't. I think select()'s
screwed too... code which uses it did work when invoked from a cygwin
application so I haven't bothered messing with it much..

Invoking, it in a very simplier manner, from inside a commercial lump of
junk yields the same results.

Anyone got any thoughts? I getting really close to having to use
micromush tools and yucky ugly stuff like that..


Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list