[Qt-interest] How to deploy Application successfully compiled using QT in Cygwin in Windows?
Andreas Pakulat
apaku at gmx.de
Mon Sep 7 20:09:09 CEST 2009
On 08.09.09 01:32:37, Wilson Pok wrote:
>
> > From: jwm at nei.nih.gov
> > Date: Mon, 7 Sep 2009 10:36:41 -0400
> > Why did you compile QT in cygwin on Windows? Why not just install Qt for
> > windows. If you compile your Qt application using MinGW, all you have to
> > deploy with your application is the mingw10.dll. Your application won't
> > need an X-server. An application compiled under cygwin will require
> > users to install cygwin on their computers and start cygwin's X-server
> > prior to using your application.
>
>
> This is because the following header files in my appplications are in Cygwin but not in Qt.
>
>
>
> #include <sys/socket.h>
>
> #include <netinet/in.h>
> #include <arpa/inet.h>
>
> I tried to copy the header files over to Qt and compile but it wont work as each of these header files has included other Cygwin header files.
>
> Actually, I would prefer to compile directly using Qt if I am able to. Any help?
Thats easy: Wherever you have code that needs functions from these
headers, replace the code with #ifdef Q_OS_UNIX <origincal code> #else
<here you need to write code using the win32 API> #endif.
Of course that would not be needed if you'd use only Qt api, but I guess
there's something in those headers that is not covered by Qt.
Andreas
--
Stay away from hurricanes for a while.
More information about the Qt-interest-old
mailing list