ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I would like to know on which libraries is likely compiled Windows 3.1?
the early evolution of Windows is closely related to that of OS/2; some people claim they even share parts of the same codebase, which is plausible because Microsoft and IBM worked closely together on the first versions of OS/2. Apart from that, it was often claimed that Windows was for the most part written in plain C and parts of it in assembly language. That would rule out C++ libraries, and of course those that appeared after 1990. Windows 3.1 was mainly a facelift of 3.0 with some re-work, especially in terms of multimedia and improved stability, but one would not assume that the programmers at MS introduced a completely new toolchain in 1992.
the early evolution of Windows is closely related to that of OS/2; some people claim they even share parts of the same codebase, which is plausible because Microsoft and IBM worked closely together on the first versions of OS/2. Apart from that, it was often claimed that Windows was for the most part written in plain C and parts of it in assembly language. That would rule out C++ libraries, and of course those that appeared after 1990. Windows 3.1 was mainly a facelift of 3.0 with some re-work, especially in terms of multimedia and improved stability, but one would not assume that the programmers at MS introduced a completely new toolchain in 1992.
1) Here some nice news:
How to use graphics.h on linux.
attached
It looks so simple to use.. graphics.h
2) I meant sdl simple layer for graphics
3) why graphics.h is not popular under Linux?
it is quite light, and do not need x11 for fast applications
4) Edit:
Code:
$ gcc -lncurses -llibgraph test.c
test.c:2:21: error: graphics.h: No such file or directory
test.c: In function 'main':
test.c:6: error: 'VGAMAX' undeclared (first use in this function)
test.c:6: error: (Each undeclared identifier is reported only once
test.c:6: error: for each function it appears in.)
test.c:6: error: 'DETECT' undeclared (first use in this function)
Code:
#include<stdio.h>
#include<graphics.h>
int main()
{
int gd,gm=VGAMAX; gd=DETECT;
initgraph(&gd,&gm,NULL);
line(50,50,80,80);
delay(5000);
return 0;
}
No Microsoft does not use "graphics.h" or SDL to "draw pixels." The pixel-blitting layer of Windows is called GDI. It was written specifically to implement Windows and is (obviously) only available on Windows.
No offence, but it's physically painful to see speculation (Does Windows use SDL? MS probably used graphics.h to draw pixels!) that's this silly.
as a matter of fact, I hadn't even known SDL as a graphics library before this thread.
Quote:
Originally Posted by dugan
As does the fact that he never even bothered to find out which library "graphics.h" is part of.
The identifiers (constants and functions) being used and the semantics remind me very strongly of Borland's graphics library which was bundled with Borland C++ and Borland Pascal for Windows. That, however, originates from somewhere in the late 80's.
as a matter of fact, I hadn't even known SDL as a graphics library before this thread.
The identifiers (constants and functions) being used and the semantics remind me very strongly of Borland's graphics library which was bundled with Borland C++ and Borland Pascal for Windows. That, however, originates from somewhere in the late 80's.
[X] Doc CPU
Thanks. The code which is into the graph (libgraph) which is made to be working on Linux is actually based on the
very old graphics.h.
It is a library code that is quite minimalist, but might allow to do some cross-platform of some various program on Windows and Linux.
It is of course completely outdated, but it remains however particularly interesting for research and some purposes.
It is slow, but very interesting if you have some particular things to do.
Comments from Dugan are to be laugh at. He gives comments on things he does not know. I would sincerely recommend him to avoid negative comments.
Of course, that I read the stuffs from the code of libgraph. I understood the purposes of it. I read the code src of libgraphics (for Linux), read all html pages in it, and also have seen that it is a work-around based on SDL.
I have a right to appreciate that graphics.h (for Linux ) is made available.
Maybe I have asked a silly question. I am sorry However have you rights to say that this is a silly question.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.