ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Graficos_en_c++


Enviado por   •  17 de Noviembre de 2014  •  596 Palabras (3 Páginas)  •  161 Visitas

Página 1 de 3

Creating 2D graphics programs under DOS is easy if you’re using [turbo c]. There is library file called graphics.h that does the tiresome work for you. But unfortunately this library is borland specific you can’t use it on other compilers.

Even though some peoples somehow managed to port it outside the turbo. Some people hacked their own version of graphics.h. One such person is Micheal main, he ported some of borland graphics functions and library.

Micheal main modified BGI library for windows application to be used under MinGW. This BGI library is renamed as WinBGIm. Now you can use all the borland specific functions under Dev-C++.

Installation

In order to run graphics programs under Dev-C++ you have to download WinBGIm files. Download the files listed below.

• Graphics.h (download to C:\Dev-Cpp\include)

• libbgi.a(download to C:\Dev-Cpp\lib)

Once you download the files. Now you have to place into the correct location in Dev-C++ installation folder. Try to locate include and lib folder under your dev-cpp installation. Move these files under the respective folder of include and lib. like e.g. D:\Dev-cpp\ include & D:\Dev-cpp\lib .

Configuration

At last step you’ve downloaded & installed the WinBGIm, now you have to configure it to use under Dev-C++. You’ve to set some project options in Dev-C++ in order to run WinBGIm references properly.

Follow the steps below to set proper project options for WinBGIm.

1. Go to the “File” menu and select “New”, “Project”,Choose “Empty Project” and make sure “C++ project” is selected. Give your project suitable name and click on “Ok”.

OR

1. You can create individual C++” source file” instead of “project”. Go to the “File” menu and select “New Source File” OR Go to the “Project” menu and select “New File”.

2. Go to “Project” menu and choose “Project Options”.

3. Go to the “Parameters” tab.

4. In the “Linker” field, enter the following text:

• -lbgi

• -lgdi32

• -lcomdlg32

• -luuid

• -loleaut32

• -lole32

5.Click “Ok” to save settings.

Now you’ve done with the configuration for WinBGIm. Please make sure you’ve done this step properly otherwise compiler will flag error.

Testing

...

Descargar como (para miembros actualizados)  txt (4.1 Kb)  
Leer 2 páginas más »
Disponible sólo en Clubensayos.com