From MAILER-DAEMON Sat Apr 3 23:20:49 2004 Date: 03 Apr 2004 23:20:49 -0500 From: Mail System Internal Data Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA X-IMAP: 1081052449 0000000000 Status: RO This text is part of the internal format of your mail folder, and is not a real message. It is created automatically by the mail system software. If deleted, important folder data will be lost, and it will be re-created with the data reset to initial values. From thiebaut@cs.smith.edu Sun Mar 28 13:04:55 2004 Return-Path: Delivered-To: streinu@turing.csc.smith.edu Received: from out009.verizon.net (out009pub.verizon.net [206.46.170.131]) by cs.smith.edu (Postfix) with ESMTP id 91AEC3EA8E for ; Sun, 28 Mar 2004 13:04:55 -0500 (EST) Received: from cs.smith.edu ([151.203.189.86]) by out009.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040328180451.DNBA29216.out009.verizon.net@cs.smith.edu> for ; Sun, 28 Mar 2004 12:04:51 -0600 Message-ID: <406713A9.1040909@cs.smith.edu> Date: Sun, 28 Mar 2004 13:04:25 -0500 From: "D. Thiebaut" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ileana Streinu Subject: Re: qt question References: In-Reply-To: Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out009.verizon.net from [151.203.189.86] at Sun, 28 Mar 2004 12:04:51 -0600 Status: RO X-Status: A X-Keywords: hi Ileana,
You have several ways of dealing with that problem:
  1. run your program with the Visual C++ IDE and step by step using Visual C++.  This requires loading your program in VC++, converting the Qt project to an VC++ project, compiling and running/single stepping.
  2. Display messages from your code using QMessageBox.  Here is a simple illustration:
	#include <qmessagebox.h>
	#include <qstring.h>


	#define debug( a, b ) QMessageBox::information( 0, a, b, 0 )

	...
	void someFunction( int x ) {

		debug( "In someFunction", QString( "x = %1" ).arg( x ) );
	...
	}
 
  1. Add a textEdit to your main widget, just for output purposes.  Call it winCout for example.  Then inside your code you can do things like

    	winCout->append( "here we are" );
    	x = x+3;
    	winCout->append( QString( "x=%1" ).arg( x ) );
Have fun!

Dominique









Ileana Streinu wrote:
Hello, QT expert  Dominique :-)

Would you please give me some advice? Now that you converted me to a QT
fan, I am trying to design a module for csc112. And got stuck with a very
simple simple simple thing! How do I debug without the debugger? I want to
print messages on the console, just old simple plain cout statements.

I created a qt application under windows, and tried to use cout in C++
code to print stuff in the console window. I included <iostream.h> as
usually. But it doesn't seem to work. It compiles and links, but gives
some link warnings about some .dll files.  The executable runs, but
doesn't print anything. Maybe I need to set up some paths to find the i/o
modules?  Any advice?

Thanks, ILeana

  

-- 
__________________________________
Dominique Thiebaut, Assoc. Prof.
Dept. Computer Science
Smith College
Northampton, MA 01063
Tel: (413) 585 3854
Fax: (413) 585 3786
Email: thiebaut@cs.smith.edu
Web: http://cs.smith.edu/~thiebaut
From thiebaut@cs.smith.edu Sun Mar 28 13:16:39 2004 Return-Path: Delivered-To: streinu@turing.csc.smith.edu Received: from out011.verizon.net (out011pub.verizon.net [206.46.170.135]) by cs.smith.edu (Postfix) with ESMTP id 6B57B3EA3C for ; Sun, 28 Mar 2004 13:16:39 -0500 (EST) Received: from cs.smith.edu ([151.203.189.86]) by out011.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20040328181635.TUJM18566.out011.verizon.net@cs.smith.edu> for ; Sun, 28 Mar 2004 12:16:35 -0600 Message-ID: <4067166B.1010407@cs.smith.edu> Date: Sun, 28 Mar 2004 13:16:11 -0500 From: "D. Thiebaut" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ileana Streinu Subject: Re: qt question References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out011.verizon.net from [151.203.189.86] at Sun, 28 Mar 2004 12:16:35 -0600 Status: RO X-Status: X-Keywords: Yes, you have to let go of the console with windows! It's not that bad! :-) Although I see from time to time snipets of programs showing people doing output to a console, but I have never found an easy way of doing it. Beowulf is all set for Qt. The process is as follows: designer qmake make and you have an application. Everything is set. Dominique Ileana Streinu wrote: >Thanks, Dominique. Your answer seems to imply that there is no simple >access to the console, right? A bit of a pain, but seems compatible with >the Windows spirit. > >Have you used Qt under linux (beowulf)? Do you know what needs to be done >there, to get started (i.e. setting up the path). > >Ileana > > > -- __________________________________ Dominique Thiebaut, Assoc. Prof. Dept. Computer Science Smith College Northampton, MA 01063 Tel: (413) 585 3854 Fax: (413) 585 3786 Email: thiebaut@cs.smith.edu Web: http://cs.smith.edu/~thiebaut