X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Message-ID: <95455e980802201824r66d12064pcc812e3a81206e4d@mail.gmail.com>
Date: Thu, 21 Feb 2008 13:24:06 +1100
From: hce <webmail.hce@gmail.com>
To: cygwin@cygwin.com
Subject: Re: Building C++ program with QT under cygwin
In-Reply-To: <47BCDAC7.6080101@cygwin.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
References: <95455e980802201631t62ff6b6pd8074e93d40fa7a7@mail.gmail.com> 	 <47BCCC17.2090304@pacific.net.sg> 	 <95455e980802201733u19f0b02at14ac05dda3ff0256@mail.gmail.com> 	 <47BCDAC7.6080101@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On Thu, Feb 21, 2008 at 12:58 PM, Larry Hall (Cygwin)
<reply-to-list-only-lh@cygwin.com> wrote:
>
> hce wrote:
>  > On Thu, Feb 21, 2008 at 11:55 AM, Erich Dollansky
>  > <oceanare@pacific.net.sg> wrote:
>  >> Hi,
>  >>
>  >>  one thing at a time.
>  >>
>  >>
>  >>  hce wrote:
>  >>  >
>  >>  > I am new to cygwin. I've just installed cygwin for building my C++
>  >>
>  >>  I see Cygwin as an emulator. Your program will see Linux but not
>  >>  Windows. But you still can call Windows directly.
>  >>
>  >>
>  >>  > and the C++ program was built using macro #ifdef WIN32 for the code of
>  >>  > select(), read() and write() system calls. My understand is that I can
>  >>  > use all linux system calls under cygwin, should I remove all #ifdef
>  >>  > WIN32 in the program and compile with a parameter -unix rather than
>  >>  > win32?
>  >>
>  >>  Do not delete those things. Never ever even think of deleting them.
>  >>
>  >>  > The major issue is the QT package. In linux, I installed a QT package
>  >>  > for linux and called the QT gmake to generate a Makefile. On window
>  >>  > the QT was installed for window and compiled under window environment.
>  >>  > I have got errors when using window QT to generate Makefile under
>  >>  > cygwin. How should I use the QT under cygwin? Should I download a unix
>  >>  > version QT and build the QT using unix macro under cygwin, or should I
>  >>  > still using window QT under cygwin?
>  >>  >
>  >>  You must install QT inside Cygwin if you want to make full use of it.
>  >
>  > All right, I am going to install the QT inside Cygwin. Now, there are
>  > two QT packages, one for Window and one for Linux. Should I download
>  > one for Linux and build it for linux under Cygwin?
>
>  If you can live with QT3, just go to kde-cygwin.sourceforge.net and install
>  the pre-packaged version using 'setup.exe'.

I am using QT 4.3 under linux, so I guess have to download the same
version QT to the cygwin. I guess you said yes I should install the QT
4.3 for Linux package under Cygwin. Please correct me.

>
>  > Should I also to call QT gmake with "-unix -o" to generate Makefile,
>  > the same parameters I was calling from linux?
>
>  If you must go this way then yes, I would recommend trying that.
>
>
>  >>  I have no idea if this will work.
>  >>
>  >>  In theory you should be able to use the Windows version. This will make
>  >>  your program even more weird as it itself will behave like a Linux
>  >>  program but the libraries are then a mix of Windows and Linux.
>  >>
>  >>  Try to stick either with Cygwin or move to Windows.
>  >
>  > I have to stick with Cygwin as the Windows does not support select()
>  > for file system, nor does the minGW. Try to learn Cygwin program
>  > environment as much as possible :-).
>
>  In general, if you work the way that you would work on a Linux system,
>  then you'll have better luck with Cygwin.

Great, I have zero experince on Window program. This is what I am looking for.

Thank you Larry.

Jim

--
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/

