Δημοσιεύτηκε: 09 Ιαν 2012, 20:12
από medigeek
$ cat test.pas
Program Lesson1_Program1;
Uses Crt;

Begin
Clrscr;
Writeln('Hello World.'); {test}
End.


Κώδικας: Επιλογή όλων
fpc test.pas; ./test


$ fpc test.pas; ./test
Free Pascal Compiler version 2.4.4-2ubuntu1 [2011/09/27] for x86_64
Copyright (c) 1993-2010 by Florian Klaempfl
Target OS: Linux for x86-64
Compiling test.pas
Linking test
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
8 lines compiled, 0.1 sec
(καθάρισε η οθόνη)
Hello World.


Απλά αγνόησε το warning, σύμφωνα με την απάντηση εδώ: http://www.freepascal.org/faq.var#unix-ld219

Μπορείς να δουλέψεις με fp ide στην κονσόλα:
Κώδικας: Επιλογή όλων
sudo apt-get install fp-ide
fp-2.4.4

File > Open > test.pas
Compile > Compile
Run > Run