Magic C++ 4.0 step by step tutorial
How to write your first "Hello World"
- Environment
- Magic C++ Introduction
Difference between Magic C++ Editions
- Install Magic C++
- Configure Magic C++
For Magic C++ Enterprise Edition 4.0
For Magic C++ Advanced Enterprise Edition 4.0
- "Hello World" Project
For Magic C++ Enterprise Edition 4.0
For Magic C++ Advanced Enterprise Edition 4.0
- How to get more support?
- Contact us
Version: Magic C++ 4.0
Server OS: Redhat 8.0 for x86
Client OS: Win2000
Back to Top
Magic C++ is a fully visual integrated development environment designed to meet the requirements of programmers developing on any remote Unix/Linux/BSD platform and local Cygwin/MinGW under windows.
By integrating support for FTP/TELNET, SFTP/SSH 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 Unix/Linux/BSD 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 Unix/Linux/BSD 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
- Support IBM Rational ClearCase and MS Visual Source Safe
Difference between Magic C++ Enterprise Edition and Advanced Enterprise Edition
| File Transfer Protocol |
FTP/SFTP |
Samba/IBM Rational ClearCase Mapped drive* |
* ClearCase will synchronize between windows local directory and Unix/Linux/BSD remote directory because they are in the same view but
mounted on different places. |
| MS VC++ AppWizard compatible |
 |
* |
* need rebuild from source codes with Magic C++ AppWizard library |
| MS VC++ Addins compatible |
 |
* |
* some Addins need modify source codes to work with Magic C++ IDE |
| IBM Rational ClearCase Support |
 |
 |
|
| MS Visual Source Safe Support |
 |
 |
|
| MS SCC API compliant* |
 |
 |
* MS SCC API is the universal programming interface for 3rd party source control software |
| Please contact marketing@magicunix.com for more information. |
|
Back to Top
Please refer installation guide for Magic C++
Back to Top
For Magic C++ Enterprise Edition 4.0
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 server environment information
Select operation system type and development environment of the remote server.

(3)Select a command session protocol
Please refer installation guide for Magic C++ for more information on how to select command session protocol.

(4)Configure authentication information for command session protocol
input username, password and port for remote login authentication,
***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.

(5)Configure authentication information for file transfer protocol
Magic C++ uses FTP/SFTP protocols to transfer files between windows client and the Unix/Linux/BSD remote server.
Input username and password for authentication,
input the port number which FTP/SFTP service(daemon process) listen at.
Click Test button to test the connection and check the information you have input.
Click Next button.

2.Expert mode
Select menu File/Remote Server Management and click New button,the Server Property dialog will pop up.
(1)Configure basic information
input server name, IP address.
select operation system type and development environment of the remote server.
***If you're using a cross toolchains for embedded development which contains non-standard compiler and debugger name, you MUST customize it here by press Customize button***

(2)Configure command session protocol
Select a command session protocol, input username, password and port for remote login authentication
***If you have changed the Remote Development Agent(daemon process) listen port, you MUST change this option to work normally.***

(3)Configure file transfer protocol
Magic C++ uses FTP/SFTP protocols to transfer files between windows client and the Unix/Linux/BSD remote server.
Input username and password for authentication, input the port number which FTP/SFTP service(daemon process) listen at.
***If the FTP server's working root directory is not /, you MUST change FTP Root Directory option here to work normally.***

(3)Configure advanced properties
When you choose standard TELNET or SSH as session protocol, Magic C++ will automatically install remote tools( server side command line tools for text search/replace etc. ) under your $HOME directory, you can select another directory where it should be installed in the editbox of Remote Tool Directory.

For Magic C++ Advanced Enterprise Edition 4.0
Magic C++ Enterprise Edition accesses Unix/Linux/BSD remote files via FTP/SFTP protocol, but it's different for Magic C++ Advanced Enterprise Edition, it accesses Unix/Linux/BSD remote files directly as windows local files with assistance by 3rd party tools include Samba, IBM Rational ClearCase Client for windows etc., these tools can map Unix/Linux/BSD remote directory to windows local directory seamlessly for user applications transparent access. With this mapping relationship Magic C++ will forward all the operations include Compile/Debug to the remote Unix/Linux/BSD servers, and present a seamless interface to execute compiler and
debugger. You MUST setup windows mapping driver by those 3rd party tools before using Magic C++ Advanced Enterprise Edition, then configure the mapping information as below.
There are two ways to configure a remote directory map
1.Wizard mode
Select menu File/New...
(1)Configure basic information
Select Directory Map property sheet of the pop-up dialog,
input windows local directory, Unix/Linux/BSD remote directory and IP address then click OK button.

(2)Configure server environment information
Select operation system type and development environment of the remote server.
(3)Select a command session protocol
Please refer installation guide for Magic C++ for more information on how to select command session protocol.
(4)Configure authentication information for command session protocol
input username, password and port for remote login authentication,
***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.
2.Expert mode
Select menu File/Remote Directory Map and click New button, the Server Property dialog will pop up.
(1)Configure basic information
input windows local directory, Unix/Linux/BSD remote directory and IP address
select operation system type and development environment of the remote server.
***If you're using a cross toolchains for embedded development which contains non-standard compiler and debugger name, you MUST customize it here by press Customize button***

(2)Configure command session protocol
Select a command session protocol, input username, password and port for remote login authentication
***If you have changed the Remote Development Agent(daemon process) listen port, you MUST change this option to work normally.***
(3)Configure post-login commands and pre-logout commands
You can customize the login commands here to satisfy your special requirement.
***If you're using IBM Rational ClearCase as your source codes control system, you MUST input ClearCase setview command here to work normally***
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
For Magic C++ Enterprise Edition 4.0
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, select a remote Unix/Linux/BSD directory 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.

For Magic C++ Advanced Enterprise Edition 4.0
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, select a windows local directory which has been mapped to a remote Unix/Linux/BSD directory by 3rd party tools then click OK button.

it will show Project wizard 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
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
http:://www.magicunix.com
Back to Top
Copyright(C)2005 MagicUnix Information Technology Limited. All rights reserved. |