Step by Step

From SmartWin Wiki

This Wiki page is intended for those who are new to SmartWin++/Dev-C++ such as students and hobbyists who are beginning to learn C++.

Install and Test Dev-C++

First download Dev-C++ (http://www.bloodshed.net/dev/devcpp.html), a free IDE which includes full Mingw (http://www.mingw.org/) compiler system with GCC 3.4.2 (http://gcc.gnu.org/) and GDB 5.2.1 (http://www.gnu.org/software/gdb/gdb.html).

Components

  1. The GCC compiler--a program to turn your code into executable machine language.
  2. The GDB debugger--a program that lets you peek inside your program for debugging.
  3. Make--a program to control how programs are built.
  4. A linker--to assemble all the files in a program into one (or a few) executables.
  5. The Dev-C++ Development Environment—a tool that lets you view and edit programs and contains hooks to the programs above that make it easy to compile, debug, and run programs.

After you have downloaded Dev-C++, run the installer. You will be prompted to decide if you want to create an index for code completion. Select Yes.

Test the Dev-C++ Installation We have to ensure that Dev-C++ is working before laying SmartWin++ on top of it. The installer is very good and this will usually succeed without incident.

  1. Create a new project using a template ("File|New|Project..."). Select "Console Application", "C Project", then hit OK.
  2. Enter the location where you want to save the project and hit OK.
  3. You will then see the Dev-C++ IDE. On the right side, you should see a large window that contains some source code similar to this.

#include <cstdlib>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    system("PAUSE");
    return EXIT_SUCCESS;
}

Add the following line after the {, and before the 'system("PAUSE");' line;

cout << "Hello World!\n";

Run the application via "Execute|Compile and Run" or F9. If you see the black box and "Hello World!" window then Dev-C++ is ready for the next stage.

Installing SmartWin++

SmartWin++ is available via the Dev-C++ / Devpak.org package manager. You can install the package directly from Dev-C++.

Installing SmartWin++ with the Package Manager

  1. Open Dev-C++.
  2. Select Tools -> Check for Updates/Packages.
  3. You should be presented with the WebUpdate window.
  4. Select "devpaks.org Community Devpaks" in the "Select Devpak server" box.
  5. Click "Check for updates."
  6. Click the "!!! Security Warning !!!," read and understand it. I have found the SmartWin package to be OK, but you are cautioned.
  7. Select SmartWin from the Available Updates list and click "Download selected."
  8. When the download completes, you will see a notification box. Click OK to install the package.
  9. The manager will unpack the package and run the setup utility. Click Next-> Next-> Finish.
  10. The SmartWin++ libraries are now installed.