[fpc-pascal] Linux Port help

James Richters james at productionautomation.net
Fri Jul 22 21:59:01 CEST 2016

I'm a newbie trying to port an old turbo pascal program to FreePascal in
linux.   My reasons for doing this is old Pentium 233 motherboards are
getting harder to keep running and I need be running on more modern
hardware..  It's a massive program and I just don't have time to re-write
the whole thing, that's why freepascal seems like a good solution.  I have
it working fairly well on windows, but I'm trying to get away from windows,
and get it working on linux instead.   I've managed to get free pascal
installed on an Ubuntu x64 virtualbox VM and I can run the IDE, but I'm
having difficulty getting it to work.  I have several issues I just don't
know how to solve

1.  graph unit issues.    In my windows port I'm able to use graph unit, in
linux there is no graph unit in the x86_64-linux folder.  It does exist in
i386-linux, but I can't seem to compile my program for 386.  In the windows
version I have an option to use 80386, in linux I do not.   I have tried to
use the other graphic units found in graph under x86_64 linux.  I was able
to successfully compile with ptcgraph, but everything is blue, I figure it
is using more colors than my old 16, so I changed a few colors to larger
numbers and sure enough I can get other colors... so I could do global
searches and replaces to solve the color issue.. but I have other issues
with ptcgraph and/or linux.
If I try to use ggigraph, I cannot even compile it.  It says "Error while
linking" and it references the END. Line at the end of my main program.. I
don't know why, there is nothing wrong with that line and it compiles with
ptcgraph just fine.

2. I can't get my fonts to work with ptcgraph.  I was using the turbo pascal
graphic fonts, I was able to get them working in windows, but not in the
linux version.  I'm not sure if it's an issue with ptcgraph or linux or how
to even start to figure out the problem.

3. with ptcgraph, I have no control of the keyboard.   When I run from the
compiler, I must pop up the terminal window on top of my graphics window to
be able to use the keyboard, however if I try to run the compiled program on
it's own, I don't have a terminal window.. and I just have no control over
the program.. I have my graphic screen, but it ignores the keyboard, and I
can't do anything with it.  The windows version also has the Dos window, but
it allows it to remain behind the graphic window and my keyboard still

4. not full screen.  For some reason I can't get it to be full screen in
linux at all.. Its always in a window.  The windows version is ALMOST full
screen, I would like to get rid of the windows bar across the top and make
it truly full screen.  I don't need a way to minimize it or to use any
windows controls, when I'm done with it I can just close it and be back in

Any suggestions on how to either use the original 'graph' unit or how to
change to something else and retain functionality?  All I want to do is make
my program look and operate the way it did on DOS with turbo pascal.  I
don't want to redesign the entire thing.  The windows version is close but
as I mentioned I would love to get rid of the windows bar across the top of
the screen and make it truly full screen. 

More information about the fpc-pascal mailing list