Skip to content

This toolkit is designed to help quickly start with C and C++ programming, with focus on depreciated graphics.h lib

License

Notifications You must be signed in to change notification settings

kalyugwasi/Cpp-Kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

C/C++ Kit

A complete C/C++ development kit with everything you need to get started with C/C++ programming, including graphics support and pre-configured VS Code tasks.

License: Apache 2.0 Latest Release Total Downloads Visitor Count



Download Button

πŸ“ Installation Paths

Compiler:           C:\mingw64
Examples:           %USERPROFILE%\Documents\Kalyug C++ Student Kit\Examples
VSCode Templates:   {app}\vscode-templates

Important: After installation, open a new terminal or restart your PC to update PATH environment variables.



πŸš€ Quick Start with VS Code

First-Time Setup (For Graphics)

  1. Download Latest release from top of the page (or click here)

Release Install

  1. Install the .exe File
  2. Open VS Code
  3. Go to File β†’ Open Folder
  4. Select:
    • πŸ“‚ Documents
    • πŸ“‚ Kalyug C++ Student Kit
  5. Click Select Folder
  6. If prompted, click:
    β†’ Yes, I trust the authors
  7. Open: Examples/circle.cpp
  8. Install: C/C++ Extensions Pack
    (VS Code will suggest automatically, or use this link
  9. Press Ctrl + Shift + D β†’ Select Run Graphics C++

debug.gif

  1. Press Ctrl + Shift + B β†’ Built
  2. Press F5 (or Fn + F5) β†’ Run

πŸŽ‰ You’re ready to build graphics programs!



πŸ› οΈ Building Your Code

Using VS Code Tasks

Task Shortcut
Show all build tasks Ctrl + Shift + B
Show debug configuration Ctrl + Shift + D

Available Tasks

  • Build Normal C++ β†’ Standard console apps
  • Build Graphics C++ β†’ Programs using graphics.h

Output Location: .bin\your_program.exe



✨ Features

  • βœ… MinGW-w64 C++ Compiler (64-bit)
  • βœ… graphics.h + winbgim.h (WinBGIm library)
  • βœ… libbgi.a Graphics Link Library
  • βœ… Example Programs (Stars.cpp + Circle.cpp + rectangle.cpp)
  • βœ… Pre-configured Build tasks for VS Code



πŸ“¦ What's Included

Component Description
Compiler MinGW-w64 GCC 15.2.0 (64-bit)
Graphics Library WinBGIm for easy graphics programming
Examples Sample C++ programs with graphics
VS Code Setup Ready-to-use build tasks



Command Line

Standard C++ Program

g++ file.cpp -o a.exe

Graphics Program

g++ file.cpp -o a.exe -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32



πŸ“š Example Programs

Program Type Description
stars.cpp Basic First basic program
circle.cpp Graphics Draws a circle using graphics.h
rectangle.cpp Graphics Draws a rectangle using graphics.h



πŸ› Troubleshooting

Error: 'initgraph' or 'circle' undefined

Cause: Missing graphics library link flags

Solution: Use the "Build Graphics C++" task instead of the normal build task

Error: g++ command not recognized

Cause: PATH environment variable not updated

Solution:

  • Restart your PC, OR
  • Open a fresh terminal window (close and reopen your terminal)

Graphics not displaying

Cause: Graphics.h requires specific Windows libraries

Solution: Ensure you're using the "Build Graphics C++" task which includes all necessary library links

File Compilation error

Cause:

Expected:      %USERPROFILE%\Documents\Kalyug C++ Student Kit\Examples
Acutal:        %USERPROFILE%\onedrive\Documents\Kalyug C++ Student Kit\Examples 

Solution: Change the location of the file "Kalyug C++ Student Kit" to expected location

🀝 Contributing

This project is free to share and improve. We welcome:

  • Bug reports
  • Feature suggestions
  • Code improvements
  • Documentation enhancements
  • Sponsorship

🎯 Getting Help

If you encounter issues:

  1. Check the Troubleshooting section above
  2. Contact me at kumarhimanshu2609@gmail.com
  3. Review the example programs
  4. Verify your installation paths
  5. Ensure all PATH variables are properly set