PDA

View Full Version : Pascal Programming on ubuntu



fasoulas
January 7th, 2007, 10:56 AM
I would like to now if there is any way so i can program with pascal on ubuntu i am learning pascal in school so i have it install it on my windows xp installation to practice amd i am wondering there is anyway so i can do that on ubuntu (i searched synaptic ,it comes up with a lot of packages but i don't now which to choose)

moma
January 7th, 2007, 11:33 AM
You can try the Lazarus Pascal IDE.
o--> http://www.lazarus.freepascal.org/

I think you must install both FreePascal compiler and the Lazarus IDE.

1) Download "fp_all_deb.tar" and "lazarus_0.9.20-0_i386.deb" from
http://sourceforge.net/project/showfiles.php?group_id=89339&package_id=204004

Install FreePascal compiler (fp_all_deb.tar) first. Unpack the tar file into an empty directory and run
$ sudo dpkg -i *deb

Download the "lazarus_0.9.20-0_i386.deb" and install it
$ sudo dpkg -i lazarus_0.9.20-0_i386.deb

You may need to install several dependencies which Lazarus requires.
Eg. you will need to install
$ sudo apt-get install libgdk-pixbuf-dev

Search for any missing package like this
$ apt-cache search pixbuf
-----

Start Lazarus IDE: (the package ha some errors and it puts some bad sym-links to /usr/bin )
$ /usr/share/lazarus/lazarus

Good luck. Tell us how it is :-k
-----

See also:
http://www.ubuntuforums.org/showthread.php?p=1962696#post1962696


Note that you can use the FreePascal IDE (text based ~ turbo pascal 4) and compiler directly. Test
$ fp
and
$ fpc

fasoulas
January 7th, 2007, 05:45 PM
ok thnx a lot for the links and the info i will try them.
Sorry i couldn't reply earlier i wasn't home.
Thnx again

fasoulas
January 7th, 2007, 06:11 PM
You may need to install several dependencies which Lazarus requires.
Eg. you will need to install
$ sudo apt-get install libgdk-pixbuf-dev

Search for any missing package like this
$ apt-cache search pixbuf
-----

Start Lazarus IDE: (the package ha some errors and it puts some bad sym-links to /usr/bin )
$ /usr/share/lazarus/lazarus



From that point and after i couldn't understand very well what do u mean.
What do u mean by saying i have to install several dependencies which Lazarus requires OR how to search for missing package and what kind of errors do the lazurus IDE package has ???

Could u pls answer to my questions because i am new to linux

moma
January 12th, 2007, 05:47 PM
Lazarus requires some additional software pieces to run properly. You can find these packages in the Ubuntu's package system (Synaptic). Start Synaptic package manager from the System -> Administration menu or use "apt-cache search ...." to find those missing packages.

Lazarus will tell you what it is missing.
libgdk-pixbuf-dev package is the one (if not the only one) you must install.


The Lazarus-package (.deb) ha some errors and it puts some bad sym-links to /usr/bin directory, therefore you must start it like this:
$ /usr/share/lazarus/lazarus
(On the command line. Or create a startup icon for it)

Lord Illidan
January 12th, 2007, 05:57 PM
Are you using Turbo Pascal at school? If so, we are in the same boat.

I found Free Pascal to be a good substitute for console programs, but for graphical programs, I needed to use a protected mode mouse unit, which would only work with Turbo Pascal 7.

So I downloaded Dosbox, and set to work.


sudo apt-get install dosbox

Once it is installed, running dosbox from the terminal will give you a dos-like window, and you can mount a folder as a virtual harddrive from there and run Turbo Pascal from it.

angustia
January 12th, 2007, 06:41 PM
Are you using Turbo Pascal at school? If so, we are in the same boat.

I found Free Pascal to be a good substitute for console programs, but for graphical programs, I needed to use a protected mode mouse unit, which would only work with Turbo Pascal 7.

So I downloaded Dosbox, and set to work.


sudo apt-get install dosbox

Once it is installed, running dosbox from the terminal will give you a dos-like window, and you can mount a folder as a virtual harddrive from there and run Turbo Pascal from it.

freepascal comes with sdl and opengl units...

sudenaz
January 12th, 2007, 06:46 PM
1.- try with pthread_detach at the end of mythread()

2.- look in /proc/sys/kernel/threads-max (max number of threads for the whole system)

3- with ps -eLf you can see processes with their threads (under LWP (light weight process))
www.unreadedpost.com

Lord Illidan
January 12th, 2007, 07:28 PM
freepascal comes with sdl and opengl units...

I know, but I cannot use them at school.