Giter Club home page Giter Club logo

graphics-library's Introduction

Graphics-Library

Download required libraries from here

It is a tradition to use Turbo C for graphic in C/CPP. But it's also a pain in the neck. Here we are using Code::Blocks IDE, which will ease out our work.

Steps to run graphic code in CodeBlocks

1. Install Code::Blocks

Make sure you have installed Code::Blocks IDE on your machine. If you don't have this IDE or have any issue with compiler download and install it from here. http://sourceforge.net/projects/codeblocks/files/Binaries/16.01/Windows/codeblocks-16.01mingw-setup.exe

2. Download the required header files

We need few files to be included in the lib folder of Code::Blocks. Download the files from here https://github.com/SagarGaniga/Graphics-Library

3. Include graphics.h and winbgim.h

Copy and Paste the graphics.h and winbgim.h files into include folder of Code::Blocks directory.

Path: C:\Program Files (x86)\CodeBlocks\MinGW\include

4. Include libbgi.a

Copy and paste libbgi.a file in the lib folder of Code:Blocks

Path: C:\Program Files (x86)\CodeBlocks\MinGW\lib

5. Add Link Libraries in Linker Setting

  • In the Code::Blocks application go to, Settings > Compiler

  • In the Global Compiler setting, click on the Linker Settings

  • In Link Libraries, Add and browse to C:\Program Files (x86)\CodeBlocks\MinGW\lib\ and select libbgi.a.

  • Paste this in the Other Linker Option tab of Linker Settings (i.e. on the right-hand side)

    -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32

  • Save the setting and restart the application

To test the setting copy paste any computer graphics code from

https://github.com/SagarGaniga/computer-graphics

graphics-library's People

Contributors

sagarganiga avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.