Home Sitemap English
                                    Guide for debugging X-Window GUI appalications with Magic C++

                                                               Last update 2004/11/23

 

Magic C++ supports for debugging X-Window GUI applications.

Here is the guide for finishing this task.

(1) Install X-Window software package on the Unix/Linux/BSD server.

For more information about this topic please refer

http://www.xfree86.org

(2) Install X-Win32 on the Windows client.

For more information about this topic please refer

http://www.starnet.com

(3) Configure X-Win32

Connect method: XDMCP

XDMCP Mode:Query

Host name: server IP address

Select security tab page and add the server's IP address to the X-Host list

(4)Create a new project in Magic C++ IDE by these sample codes

/////////////////////////////////////////////
#include <qapplication.h>
#include <qpushbutton.h>


int main( int argc, char **argv )
{
     QApplication a( argc, argv );

     QPushButton hello( "Hello world!", 0 );
     hello.resize( 100, 30 );

     a.setMainWidget( &hello );
     hello.show();
     a.exec();

     return 0;
}
/////////////////////////////////////////////

(5) Change project setting for Makefile

Change project setting to use "User customize commands" to compile.

Input QT applications compiling commands like this:

qmake -project;qmake;make

in Project/Project Setup/Makefile/Shell Command editbox.

(6) Set environment variables

environment variable:DISPLAY

value:client IP address:0.0

in Project/Project Setup/Debug/Environment variables editbox


(7) Compiling

choose menu Compile/Build to comile the QT demo application.

(8) Debugging

choose menu Compile/Debug/Go to debug the QT demo application.

Back to top

 

HomeProductPurchaseDownloadSupportPartnerContact

Copyright © 2007 Magicunix Information Technology Limited. All rights reserved.