Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Porting Turbo C graphics code into Linux

    Hello all!

    I was just wondering if any of you'll had any ideas as to how I could go about porting a Turbo C code (which basically displays a robot arm) into Linux (Debian). I'm new to Linux and am not very good at programming and hence am struggling to find a solution to this...However, this has to be done as a part of my project and any help that you'll could give me would be highly appreciated...

    I know that this involves something like using conversion libraries and rewritting the code but I'm very vague when it comes to the fine points of actually doing this.


  2. #2
    Just Joined!
    Join Date
    Oct 2005
    so what's your turbo c code?

  3. #3
    it happens. When i was a M$ user i was used to program in turbo C. the things that i missed more when i came to the ANSI C path was the conio.h functions like getch(), gotoxy(), etc. and the library to draw windows. Then i found ncurses and i fall in love again. That if you wanna rewrite your applications. But if you want to use the same functions, there is a linux port of conio.h but it doesn't work very well.

  4. $spacer_open
  5. #4
    Hey guys...

    Have made a bit of progress since my last post...Found some conversion libraries on the net and am using these to try and port/run my code in Linux...Things are not going too badly, but I've still got two errors that are giving me grief...

    Problem #1:

    I've got this declaration:
    int graphdriver=DETECT, graphmode=0;

    in my original program...The only other place this is used in the code is under main() as
    initgraph(&graphdriver, &graphmode,"");

    My error message says "'DETECT' undeclared here (not in a function)

    Problem #2:

    void drawsquare (struct pts *sqr, int col){

    fillpoly(4,(int far *)screensq);} is a function in the program that was given to me.
    Can't really see where else in the code far is used/has been declared or not...

    Error says "Syntax error before "far"".

    Any ideas as to how these could be resolved?

    Thanks heaps!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts