I have old Pascal program it has {$c-} how to compile it could someone help

  1. profile image53
    dosimonposted 4 years ago

    I have old Pascal program it has {$c-}  how to compile it could someone help


    {$C-}
    program TurboGraphicsDemo;

    {$I typedef.sys}
    VAR X:FILE;
    {$I   CSS.PAS  }
    {$I graphix.sys}
    {$I kernel.sys}
    {$I windows.sys}

  2. pctechgo profile image75
    pctechgoposted 4 years ago

    I looked at this and tried an online compiler, yes they do exist.
    The online compiler however appears to be running on Linux.
    The compiler had a fatal error looking for include files" for the .sys files specified.

    Here is the output:

    Compiling the source code....
    $fpc -v0 TurboGraphicsDemo.pas 2>&1
    Free Pascal Compiler version 2.6.2 [2013/02/16] for x86_64
    Copyright (c) 1993-2012 by Florian Klaempfl and others
    TurboGraphicsDemo.pas(3,2) Fatal: Can't open include file "typedef.sys"
    Fatal: Compilation aborted
    Error: /usr/bin/ppcx64 returned an error exit code (normal if you did not specify a source file to be compiled)

    There are free compilers , sourceforge has one for pascal .
    Get the one for windows and give it a try. 
    I suspect when you pasted the source code into your question the formatting was removed and all the source code was on one line, and that will not work (sorry if I am telling you something you already know but I just wanted to make this answer clearer). So if you try with an installed compiler, make sure your code is carriage returned like the following:
    {$C-}
    program TurboGraphicsDemo;
    {$I typedef.sys}
    VAR X:FILE;
    {$I CSS.PAS }
    {$I graphix.sys}
    {$I kernel.sys}
    {$I windows.sys}

    1. profile image53
      dosimonposted 4 years agoin reply to this

      it is set as you have listed.
      i am trying to find out why i get an error pointing to $c- parameter

 
working