Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 578047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:13:09+00:00 2026-05-13T14:13:09+00:00

I have some question about cygwin : Can I use Cygwin develop socket based

  • 0

I have some question about cygwin :

  1. Can I use Cygwin develop socket based code?
  2. Does Cygwin have read() and write() functions that work with file descriptors?
  3. Can I use Pthread library in Cygwin?
  4. Does code that compiles in Cygwin also
    compile in Linux without any change or with little change?
  5. Will an executable file that built by
    Cygwin run in Linux ?
  6. Why does Cygwin not need the linker
    option -lpthread when I use pthread library?
  7. why in #include <iostream> don’t I need to use using namespace std; ?
  8. Can I work with QT in Cygwin? If so,How?
  9. Can I boot my Linux in other
  10. partition with Cygwin and use it?
  11. Can I access the other partition
    that is EXT3 in Cygwin?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:13:09+00:00Added an answer on May 13, 2026 at 2:13 pm

    On 1:
    Yes. Socket libraries are shipped with Cygwin – many socket based apps such as web servers are included in the base distribution.

    On 2:
    Yes. I think all of the ‘section 2 and 3’ system calls in the GNU C runtime and library are implemented by the cygwin runtume. You can check this in the man pages that come with Cygwin. A list of system calls and std lib calls implementd by Cygwin can be found here.

    On 3: Yes. Pthread is included in Cygwin. The list referred to in the link above mentions pthreads as well.

    On 4: Anything built against GNU libraries should work with little or no change between Cygwin and Linux (assuming there are no dependencies missing on Cygwin). Depending on CPU architecture you may have to worry about word alignment, endianness and other architecture-specific porting issues, but if you’re targeting Windows and Linux on Intel your code would have few if any porting issues arising from CPU architecture.

    On 5: Cygwin will build a program against its own shared libraries by default but GCC can cross-compile to target other platforms. You could (in theory) set GCC up to cross-compile to any target supported by the compiler. There are plenty of resources on the web about cross-compiling with GCC, and I don’t think the process will be materially different on Cygwin.

    Note that Cygwin binaries will not run on Linux – or Vice-versa. You will still need separate builds for both.

    On 6: Not sure – at a guess it’s included in the standard runtime, perhaps because it was necessary to wrap the Win32 threading API for some reason.

    On 7: Don’t know – it’s probably the same on g++ on all platforms. Apparently a compiler bug. Dan Moulding’s Answer covers this in more detail.

    On 8: Yes. IIRC QT is available in the standard builds and it will certainly compile on Cygwin. As with Linux/Unix, QT on Cygwin uses an X11 backend so you will need to have an X server such as XMing running.

    In order to avoid the dependency on an X server you may want to build QT apps against the Win32 API,. It is possible to do this with MinGW, which is a set of header files and libraries to build native Win32 apps with GCC. MinGW can be used from within a Cygwin environment (an example of GCC on Cygwin cross-compiling to a non-Cygwin target) and the installer from cygwin.com gives you the option of installing it.

    MinGW is quite mature; it has all of the ‘usual suspects’ – libraries and header files you would expect to find on a Unix/Linux GCC development environment and is very stable. It
    is often the tool of choice for building Win32 ports of open-source software because it is (a) free, (b) supports the libraries used by the software and (c) uses GCC so it is not affected by dialectic variations between MSVC and GCC.

    However, these dialectic variations in the language and available libraries (for example MSVC doesn’t come with an implementation of getopt) mean that porting programs between MinGW and MSVC can be quite fiddly. My experience – admittedly not terribly extensive as I’ve only done this a few times – is that porting applications between MinGW32 and Linux is easier than porting between MinGW and MSVC. Obviously apps with non-portable dependencies such as Win32 specific API usage would require the dependent components to be re-written for the new platform but you’ll have far fewer problems with differences in the standard libs, header files and language dialect.

    QT does a fairly good job of providing a platform abstraction layer. It provides APIs for database access, threading, I/O and many other services as well as the GUI. Using the QT APIs where possible should help with portability and the Unix/Linux flavoured libraries that come with MinGW mean that it might give you a good platform for making applications that will port between Win32 and Linux with relatively little platform dependent code.

    EDIT: The qt development packages in Cygwin are:

    • qt4: Qt application framework (source)
    • qt4-devel-tools: Qt4 Assistant, Designer, and Linguist
    • qt4-doc: Qt4 API documentation
    • qt4-qtconfig: Qt4 desktop configuration app
    • qt4-qtdemo: Qt4 demos and examples

    You’ll probably also need gcc4-g++ and some other bits and pieces. This listing on the cygwin web site has a list of the packages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some question about lazy evaluation of c++, can I be sure that
everyone, I have some question about C++, what do You actually prefer to use
I have some question about the privacy issues using Google Analytics. I've heard that
I have some question about arrays, I'm reading some book about Java, and now
I am using the RLastFM package, and have some question about the function: >
I have now some question about hiding some characters ... I want to hide
I have in my homework some question about data structure: I have elements which
i have a quick Binding Question about Silverlight. I have some Expander and want
I am slowly moving into Silverlight from asp.net and have a question about how
I have a little bit of C programming experience from school, but it was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.