Coder Social home page Coder Social logo

ullaskunder3 / solution-to-graphics.h Goto Github PK

View Code? Open in Web Editor NEW
47.0 3.0 41.0 274 KB

My vs code setup for graphics.h ( I know its old, have to learn because of university they use turbo ๐Ÿ˜ฑ. Vs code is way better ๐Ÿ˜)

Home Page: https://ullaskunder3.github.io/Solution-to-graphics.h/

C++ 100.00%
graphics bgi cpp mingw vscode winbgi-graphics

solution-to-graphics.h's Issues

Query

Hi,
I'm new to GitHub so idk how to ask a query, that's why I'm writing it here.
First of all thanks for this amazing solution. I managed to add the compile options in tasks.json & found a way to run it through code-runner extension.

My query : Do you know how can we combine the 'WIndows BGI' popup window (that comes at the time of running the program) with the terminal?
Because I've been working on user input programs and I have to write the user input separately in the integrated terminal of VS code.
Like in TurboC, the output of printf commands as well as the graphics commands(like line, rectangle, arc) comes in the same window. But in VS code, I've to use the outtextxy command so that the input strings show in the Windows BGI.

Do let me know if you know how to fix this.

fatal error

PS C:\Users\Subhajit\Desktop\project\cpp\collage lab\testFolder> g++ -o testfile example.cpp -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
example.cpp:2:14: fatal error: graphics.h: No such file or directory
2 | #include <graphics.h>
| ^~~~~~
compilation terminated.

Graphics.h doesn't work with gcc (Rev1, Built by MSYS2 project) 11.3.0

Hey first of all I would like to express gratitude to this repo and its author.

I tried to set up graphic.h and in Visual Studio code, but code doesn't compile with the following error.

> Executing task: C/C++: g++.exe build active file <

Starting build...
C:\msys64\mingw64\bin\g++.exe -g "D:\Users\Zaphkil!\Documents\VS Code\C++ Graphics\Home\src\example.cpp" -o "D:\Users\Zaphkil!\Documents\VS Code\C++ Graphics\Home\build\example.exe" -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../..\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib\libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lbgi: No such file or directory
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../lib/libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../libbgi.a when searching for -lbgi
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.3.0/../../../../x86_64-w64-mingw32/bin/ld.exe: skipping incompatible c:\msys64\mingw64\x86_64-w64-mingw32\bin\../../../mingw64/lib/libbgi.a when searching for -lbgi
collect2.exe: error: ld returned 1 exit status

Build finished with error(s).

Terminal will be reused by tasks, press any key to close it.

I am using gcc which was downloaded through msys2.

graphics.h works as intended with gcc 6.3.0 that is downloaded through mingw64 installer.

How can i fix this issue?

Segmentation Fault

I'm trying to get this library working with vscode following your guide but I get a segmentation fault!

I can successfully build the project with ctl+shift+b and this produces a lovely executable. If I try to run this nothing happens, if i open it within the console no error messages are displayed. The segmentation fault appears on initgraph. This is probably something to do with the library .a file...

Thank you!

Incomplete file

graphics.h file doesn't contain complete function definitions for some functions

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.