Mail Archives: cygwin/2005/05/04/19:49:07
Brian Salter-Duke wrote:
> I did understand that. If I understand you correctly, one can not use
> Mingw from inside cygwin to produce working code that uses sockets and
> pthreads. Is that correct? This code does use sockets and pthreads
> although I do not strictly need them as it is code that uses them to run
> in parallel and I only want to run on one processor. Oh well, I can
> still use it in cygwin.
Sure you can. You just can't use the berkeley socket API. You use the
native windows socket API (winsock.) They are very similar, so porting
is usually not hard. But it's not a drop-in replacement as some
semantics are different.
For pthreads, you can try pthreads-win32. Or you can use the native
windows threads functions - but these two differ vastly.
The overall point here is that the code you're trying to compile relies
on posix/unix APIs, and without Cygwin those APIs are nonexistent on
windows. So you either have to use the API that windows provides, find
a library that can provide them, or do without.
Brian
--
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 -