PDA

Click to See Complete Forum and Search --> : Simple graphics in C (not C++)


HarryW
May 3rd, 2000, 10:47 PM
Hi all.

Does anyone know any graphics functions for drawing simple lines or dots? I have to write a console app in C (not C++) but it has to be compileable in Linux/UNIX, since the university uses gcc on Linux (I think it's Linux) for C programming. I'm writing it at home in MS VC++ 6 on my PC, but I need the code to be platform-independant.

I know that sounds really complicated but there must be some older pre-C++ graphics functions. I don't need anything fancy, just lines or dots, black and white is fine. Anyone have any ideas? Please? *Begs* :)

rchiav
May 4th, 2000, 12:23 AM
What libs are you supposed to use on linux? I don't think that there's any standard GNU libs that support graphics.. is this going to be a console app on linux as well or is it going to run in some form of X-Windows?

HarryW
May 5th, 2000, 09:47 AM
Umm well... I'm not entirely sure :) I don't use them much but I can tell you that they are dual-boot machines with Windows NT and... and the other OS which has UNIX commands like ls and mkdir and things.

Sorry I know that's a bit useless ;) I'm assuming it's Linux because it is running on a PC, but for all I know Unix runs on PCs as well. The OS has a GUI, a bit like windows. I guess it could be X-Windows, that sounds familiar.

I don't really want to start using the Windows-type architecture though because it's supposed to be a console app (I think). As long as I can get hold of the appropriate header file(s) I don't mind whether they're standard functions or not, but I'm pretty sure they'll have to be platform-independant.

I'm fairly new to C, I've spent most of my time doing VB and ASP, so I don't really know my way around it very well yet.

May 11th, 2000, 05:04 AM
You need to find out what platform this is to run on.
You may want to write a WinNT client to use UNIX-like server stuff (which means MSVC++ is fine for just C usage)
or
you may want to write an X-Window application to use UNIX-like stuff directly and you'll need X libraries.