Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
codeing color strings and scrolling text under linux
#1
hey all got a few questions? first who programs under linux that can show me how to code with gcc to get console string colors and string animations besides blinking text..... more scrolling through color backround. for color I am used to turbo C conio.h and I can code the same on djgpp but I can not seem to make it work with gcc under linux I tried puting conio.h in my include path and it did not work not sure what to do?? I am in the process of trying to vonvert my code over to linux! here is my example

#include <stdio.h>
#include <conio.h>
main()
{
gotoxy(19, 11);
textcolor(LIGHTRED);
cprintf("----====< THIS IS A VERY RED TEST >====----\n");
return 0;
}
Reply
#2
conio.h is purely an MS-DOS header; it is not standard.

After a bit of Googling, this looks like a nice lib: http://www.cdlu.net/libclue.html

e.g.

[syntax="C"]
#include <stdio.h>
#include <clue.h>

int main( int argc, char** argv )
{
// set the stdout colour to red
fred( stdout );
printf( "this should be red.\n" );

return 0;
}
[/syntax]
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#3
hey thanks I will look into this lib its a bit more complex than I had anticipated! Just curious though why not use lbc6 and ncureses
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)