Home Sitemap English
                                    Magic C++ step by step tutorial
                                                           ­How to write your first "Hello World"
                                                               

Index

  1. Environment
  2. Magic C++ Introduction
  3. Install Magic C++
  4. Configure Magic C++
  5. "Hello World" Project
  6. How to get more support?
  7. Contact us

Environment

Version:    Magic C++ 3.0.0

Server OS:Redhat 8.0 for x86

Client OS:Win2000 Server

Back to Top


Magic C++ Introduction

Magic C++ is a fully visual integrated development environment designed to meet the requirements of programmers developing on any remote UNIX platform and local Cygwin/MinGW under windows.

By integrating support for both FTP, TELNET and our custom Remote Development Protocol(RDP) based on a client/server architecture, Magic C++ presents a seamless interface to open and edit files, and execute compilers and debuggers. When comparing this to a conventional development process which would usually involve juggling a PC editor, file transfer utility and terminal window, Magic C++ give programmers advantages become immediately apparent.Through an integrated approach to editing, still using existing remote server-based compilers and debuggers(i.e. gdb or dbx) to compile and debug on Windows PC client, Magic C++ makes it easy to develop software regardless of whether the file is simply on your PC or located on a remote server running a kind of Linux/Unix operating system. This allows programmers developing on Linx/Unix platform to benefit from the many familiar time-saving features provided by Windows.

Key Features

  • Familiar visual integrated development environment just like Microsoft Visual C++
  • Advanced code editor
  • Seamlessly integrates with the existing compilers and debuggers on remote Linux/Unix server
  • Full-function visual integrated development environment designed to meet the requirements of the C/C++ programmers
  • Support remote development on Unix/Linux/BSD servers and local development on Windows

 

Back to Top

Install Magic C++

for remote development on Unix/Linux/BSD server

You need install the server component of Magic C++ on Unix/Linux/BSD servers for remote development,
but this phase is not necessary for local windows Cygwin/MinGW development.

Server OS: Redhat linux 8.0 (with ftp, telnet, development rpm packages installed)
Client OS: Win2000 Server

Before installing Magic C++, please check
(1)Server and client can communicate with each other normally, you can use ping to verify it
(2)Server has gcc, gdb installed and work normally

Magic C++ works based on a client/server architecture, installation need two phase to complete.
One for server component - Remote Development Agent(RDA), the other is client component - integrated development environment(IDE).

1.unzip software package
Unzip software package by zip tool(winzip, winrar etc.), and the directory after unzipping looks like this:

Server\ -- Redhat Linux rmp package for server component
Client\ -- Windows setup package for client component
Doc\    -- Document

2.install server component - Remote Development Agent(RDA)
(1) Transfer the source codes package to the server via FTP or other measures

(2) Extract files from the package, execute command as:

tar -zxvf magicd-x.tar.gz

( *** Notice: x is the release version of the package*** )

If an old version of this software package exists please remove it first.

(3) Compile the source codes and install

./configure

or

./configure --prefix=your_magicd_install_path

make

make install


(4)start Remote Development Agent(daemon process)
# cd /your_magicd_install_path/bin
# ./magicd
default listen socket port is 2004. 
You can change listen socket port by command option -p like this:
# ./magicd -p 5000
***If you have changed this listen socket port, you MUST change the server property in IDE to work normally.***
(5)stop Remote Development Agent(daemon process)
# cd /your_magicd_install_path/bin
# ./killit.sh

3.install client component - integrated development environment(IDE).
enter MagicC directory and mouse double click Setup.exe then do step by step with the guide.
 

for local development on Windows

Magic C++ 3.0 has packed MinGW in its installation package. You can check the option to install MinGW while installing Magic C++. If not the installation wizard will prompt you whether searching local development environment Cygwin/MinGW, answer YES if you would like finish this step automatically, answer NO if you would like configure it manually later in Magic C++ IDE( see below ).

Back to Top

Configure Magic C++

Configure Remote Server Profile( for remote development on Unix/Linux/BSD server )

There are two ways to create a remote server profile

1.Wizard mode

Select menu File/New...

(1)Configure basic information

Select Server property sheet of the pop-up dialog,

input server name,IP address then click OK button.

(2)Configure development environment and authentication information

Select operation system and development environment of the remote server,

input username and password for remote login(telnet) authentication,

input the port number which Remote Development Agent(daemon process) listen at.

***If you have changed the Remote Development Agent(daemon process) listen port, you MUST change this option to work normally.***

Click Test button to test the connection and check the information you have input.

Click Next button.

(3)Configure FTP information

  Magic C++ uses FTP protocols to transfer files to and from the PC to provide identical functionality when editing files regardless of their location. 

Input username and password for FTP authentication,

input the port number which FTP service(daemon process) listen at.

Click Test button to test the connection and check the information you have input.

Click Next button.

(4)Confirm the information

Please check the information for the new server profile,if you want to change click Back button otherwise click Finish button to create the server profile.

2.Expert mode

Select menu File/Remote Server Management and click operation button,the Server Property dialog will pop up.

(1)Configure server basic information,development environment and authentication information

Remote File Sync: If enable,while remote files change outside Magic C++ will notify the user.

Remote sync interval(secs): frequency for automatically detecting remote file status.

(2)Configure FTP information

(3)Configure advanced properties

Configure Local Host Profile( for local development on Windows )

You need configure the local environment settings before using Cygwin/MinGW in Magic C++.

Click File->Local Host Settings to open the Local Host Settings dialog

(1)
select correct local development environment type in Local Host
(2)
change the installation directory of Cygwin or MinGW in Installation directory if necessary, and click Test button to do a test.
(3)
change the toolchains's names include compiler, debugger, make etc. of Cygwin or MinGW by clicking customize button in Development tool if necessary.

If you've choosed to use your MinGW instead of which provided by Magic C++, please make sure you have add the path of MinGW to your environment variable PATH. To finish this task please

Open Control Panel->System->Advance->Environment->PATH
and append your MinGW's bin directory such as c:\MinGW\bin there

Back to Top


"Hello World" Project

1.Create project

Select File/New...

Select Project property sheet of the pop-up dialog,select Console EXE as project type and

input Hello as project name then click OK button.

 

it will show Project wizard step1 dialog,select program language and hello world,click Next button,

it will show Project summary dialog,check the information and click OK to generate the Hello World project.

2.Edit the source codes

  Edit the source codes according to your needs.Magic C++ provide a fully customizable code editor designed specifically for C/C++ programmers includes color syntax highlighting, auto-text, virtually unlimited undo and redo, changed line markers, split-windows, bookmarks, block text select, bracket matching.

3.Compile

Select menu Compile/Build Hello to build the project with existing remote server-based compilers.With compiler output redirected to the Magic C++ IDE, you can highlight errors with a mouse double-click.As each warning and error is highlighted, Magic C++ will attempt to load the file containing the error, (if it is not already loaded), and highlight the line on which the error is determined to have occurred.

4.Set breakpoints

  Before debugging the specified target, you can set breakpoints within the code editor or the breakpoints window.

5.Start debugging

Select menu Compile/Debug/Go or press F5 to start debuggin,Magic C++ will suspend all further debug options until it has detected that the debugger has suspended execution of the debug target (this may have happened as result of a breakpoint being reached).After that

(1)the debugging information will be shown on the Debug output tab sheet,

(2)it will highlight the debug target's current statement in the code editor, opening any necessary files.

(3)the values of variables will be shown on the Local/This/Watch output tab sheet,you can change the values according to your needs.

(4)the console dialog will be shown and provide the ability to interactive with the debugging program.

Back to Top

How to get more support?

If you have more questions about Magic C++,you can use online help document,web forum and customer service support to get more information.

Back to Top

Contact us

http:://www.magicunix.com

Back to Top


Copyright(C)2005 MagicUnix Information Technology Limited. All rights reserved.
   

 

HomeProductPurchaseDownloadSupportPartnerContact

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