Graphics without a library?

How could one go about generating graphics in C or C++ without a library?

I have tried mode 13h, and my compiler (Dev-C++) always gives me error messages.

And if anybody wants to answer this too, I can't seem to run my programs in MS-DOS
(Yes, I'm trying to use MS-DOS), I know that programs compiled in windows tend
to work only in windows but is there a way I can convert them, or a compiler that can make .EXE's that are meant FOR MS-DOS?

Any help?
Oh, yeah I forgot.

I've tried Pacific C compiler, Turbo C, and DJGPP, and none of them have worked for me (Pacific C works a little, but it doesn't compile correctly most times).

And I also wanted to mention I am DEFINITELY not new to C++ (Although I am not as well versed in C) I just haven't gotten around to graphics yet.
Last edited on
Most console applications should run under MS-DOS. You should have no problems create a console app to run in DOS.

Is this for a game?
I want to make a custom interface (It's something I've been pretty good at in the past).

And it would be nice to make a few games on the side (Which I'm also Pretty good at).

I tried creating a console APP, but when I try to run it in MS-DOS, it says that it cannot be run in console mode.

I managed to get Pacific C to create a console APP for MS-DOS, but it won't compile much more than a Hello World.
Last edited on
Then my guess is you'd have to develop it in DOS. And use a DOS compiler. This would because of the OS linked files that would need to be compiled in. (Similar to doing it on Windows and Linux).
Thats one of my problems, I've tried to compile it in DOS but none of the compilers that are for DOS will work right.
Are any of the DOS compilers updated still? They maybe using Pre C++98 standards.
They're fairly recent, not brand new or anything, but they shouldn't be out of date enough not to work.
closed account (z05DSL3A)
Have you tried Open Watcom[1]

Host Platforms
Win32 systems (IDE and command line)
32-bit OS/2 (IDE and command line)
DOS (command line)
Windows 3.x (IDE)

Target Platforms
DOS (16-bit)
Windows 3.x (16-bit)
OS/2 1.x (16-bit)
Extended DOS
Win32s
Windows 95/98/Me
Windows NT/2000/XP
32-bit OS/2
Novell NLMs

Watcom used to be very good prior to it going open source, that not to say it is not good now, I haven't used it since it was 'opened'.

[1] http://www.openwatcom.org/index.php/Detailed_Contents
As yet,I haven't hear of any complier which satified your requirement!
But you can try the "ASCII Art",although it is not the reallly graph!
I've managed to get lucky and find a compiler.
It was actually found while I was looking up some stuff about QBasic.

For anybody else who wants these basic functions, it's called FreeBasic, it was originally a Basic compiler, but they've added capability to use C functions and C libraries in it.

You could call it a C compiler with Basic functions attached (Basic has graphics capabilities). It even has mouse functions. With no external libraries needed for the Graphics/Mouse capabilities.

thanks for the help though!

P.S. -- OpenWatcom didn't work either, it would always say that it couldn't be run in DOS mode.
Topic archived. No new replies allowed.