![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2004
Posts: 3
Rep Power: 0
![]() |
People!
I'm making a proggie under LInux... I want to be able to do something like pseudo-graphics (text graphics); In DOS I would use functions defined in conio.h (clrscr(), gotoxy() etc.); Is there anything similar under LInux? P.S. I'm using RH 7.2 |
|
|
|
|
|
#2 |
|
Programming Guru
![]() ![]() |
I know for sure there are libs for that in linux, however i don't know what they are since i have never used em. Have you tried the functions that you talked about? who knows, they could be the same name as under DOS. I am sure sombody else around here knows what the header files that you are looking for are called.
__________________
Profanity is the one language that all programmers understand. Check out my Blog <---updated Nov 30 2007! |
|
|
|
|
|
#3 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 5
![]() |
>In DOS I would use functions defined in conio.h (clrscr(), gotoxy() etc.);
conio.h is a Borland creation. Linux compilers don't support it. However, if you're willing to do a little more work, you can use the curses library. Do a $ man curses |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Or you could copy conio.h from the include dir of your windows compiler and place it in your linux compiler's include directory... just a thought.
__________________
|
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
I believe it's Win32-optimized. And it has some code in it that ensures you cannot do just that:
#if !defined(_WIN32) #error ERROR: Only Win32 target supported! #endif It might work if you pull that out, but it's highly unlikely. A search for "conio" on SourceForge found a few bits though. |
|
|
|
|
|
#6 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 5
![]() |
>Or you could copy conio.h from the include dir of your windows
>compiler and place it in your linux compiler's include directory... That wouldn't work. Headers only contain declarations, so even if the compiler dependent code in conio.h didn't cause compilation errors on Linux, the program would fail to link without the necessary library files. The only way to get nonstandard functions to work with a compiler that doesn't support them is to write them yourself using features that the compiler does support, or use a third party library that basically does the same thing. |
|
|
|
|
|
#7 |
|
Programmer
|
I'm not sure if curses is the precursor to ncurses(which is used on software such as VIM and BitchX ... and maybe a few OS installers), but ncurses.h generally works for mapping pixels and frames at the CLI. ESR wrote a howto on ncurses a while back. Google might be able to pick it up with "google+"esr".
__________________
<span style='font-size:14pt;line-height:100%'><span style='color:red'>"Political power grows out of the barrel of a gun" - Mao Tse-Tung</span></span> |
|
|
|
|
|
#8 |
|
Professional Programmer
Join Date: Nov 2004
Posts: 250
Rep Power: 5
![]() |
>I'm not sure if curses is the precursor to ncurses
curses, ncurses, pdcurses, it makes no difference if you do a "man -k curses" or "apropos curses". You'll find something worth looking at. ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|