This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: problem with dll and stdout


I think this is the unwritten rule of thumb for cygwin and
incorporation of cygwin at compile time with other applications
in win32 built with vendor products such as MS visual C++,
Borland C++ builder, Borland Delphi etc...

Rule: If you are using unix calls in your code you will not be able
     to link the dll made with cygwin into any of the above mentioned

Possible Reasons:

1.) You need to initialize the cygwin1.dll which is accomplished via
    code injection into the exes built by gcc at linking, i have not
    seen ANY examples on the net of initializing the cygwin1.dll that
    actually WORK.

2.) Cygwin compiles libc methods against its own set of libraries, when
compiling with the above mentioned vendors, they will also have their
own versions of libc methods, hence a state of confusion and ambiguities
arises and in some cases the linker will link the application but crash
during runtime.

What does this mean for you?

if your cygwin compiled dll has code that uses:

1. Posix Threads and/or synchronization calls (mutexes, conditions etc...)
2. Unix style sockets
3. Unix style signaling
4. Unix style file IO

other than that if your dll code does not contain any the above, and
even though cygwin can still compile this "other" code you be compiling
that code with the vendor that you currently are using.

this is my opinion and acquired knowledge on things after spending about a week trying to interface a small backend compiled with cygwin to a delphi gui front-end. if i am wrong please tell me.


Arash Partow

ninemsn Premium transforms your e-mail with colours, photos and animated text. Click here

-- Unsubscribe info: Problem reports: Documentation: FAQ:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]