FB to Ubuntu Dapper. Step by step tutorial.

Linux specific questions.
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

FB to Ubuntu Dapper. Step by step tutorial.

Postby E.K.Virtanen » Apr 30, 2006 10:43

Seems like Ubuntu is gettin more and more popular. Well its good since its great distro.
Alltho its not once or twice when some one asks how to get FB work with it.
So i made an step by step tutorial for it.

If youre familiar with *nix, then there is nothing for you to see, this is made for beginners of *nix.
Bad thing is, this tutorial is made for ubuntu only. If you have chance to do same thing for other distros, add it here too :)

Ok, here we go.

FB for Ubuntu howto

Download latest stable version of FB linux.
Open it with your package manager.

Image

After its downloaded, you should see this.

Image

I like to extract it to on my desktop. Easy to find from there.
So i do this. (extract folder is optional to choose)

Image

Now open your terminal console. (Applications - Accessories - Terminal)

Image

cd Desktop/FreeBASIC takes you to right folder (if you choosed same location than i)

Code: Select all

sudo -s

and typing your password takes you to root console.
then type following lines.

Code: Select all

apt-get install gcc
apt-get install libc6-dev
apt-get install ncurses-dev
/*Only install the next 4 if you need X11 (non-terminal) support*/
apt-get install libx11-dev
apt-get install libxext-dev
apt-get install libxpm-dev
apt-get install libxrandr-dev
apt-get install libxrender-dev
./install.sh

If some line of those apt-get ones returns that there is no need to install it since you have it allready, then forgot it and move to next one.

After a while, FB is installed in your system and is ready to go.
Before it, type "exit" on your terminal so root privilages gets off. We dont need em anymore, so no point to keep it open. Your terminal wont get turned off, it just goes back to basic user mode.

Open your Gedit editor.
In my case, its on Applications - Accessories - Text Editor.
Write next program there.

Code: Select all

Screen 13
Print "My FB and Ubuntu are friends for now on!"
SLEEP
END


Save it as "myfile.bas" on your /Desktop/FreeBASIC" folder
Go back to terminal console, make sure youre on /Desktop/FreeBASIC folder, if not, then CD to there.

type

Code: Select all

fbc myfile.bas

then type

Code: Select all

./myfile


It should work =)

NOTE:
If you use SCREEN x in your program, you can run your program from desktop.
In case you dont use it, (program runs in pure text/console mode) you need to run it from terminal.

Note II:
I quoted nathan1993's updated apt-get list here.
Now this post is updated to Ubuntu Dapper. Not sure how it works on earlyer releases.
Last edited by E.K.Virtanen on Aug 11, 2006 7:57, edited 1 time in total.
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Postby E.K.Virtanen » Apr 30, 2006 11:11

Pictures are saved on my geocities account, so if you dont see em, it means that geocities sucks (like it does lol). Then just wait ten to fifteen minutes and i guess they work again.
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Postby {Nathan} » Jul 10, 2006 19:34

I am running the latest version of Ubuntu (6.06 Dapper Drake). You no longer need to install the X11 library, You may want to note that.

My system has the latest kernel via apt-get dist-update and ran apt-get upgrade and all the updating stuff. I ran and install Freebasic and whenever I try to compile a program I get

Code: Select all

/usr/share/freebasic/bin/linux/ld: cannot find -lc


I hate switching to M$ everytime I need to use FB (I have a duel-boot system). Please, please help!
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Postby DrV » Jul 10, 2006 20:14

You probably need some kind of libc development package; I don't know what that would be called on Ubuntu, but gcc probably depends on it, so you could try installing that.
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Postby VirusScanner » Jul 10, 2006 20:16

I think you need to install libc6-dev if I remember correctly.
joseywales72
Posts: 206
Joined: Aug 27, 2005 2:02
Location: Istanbul, Turkey

Postby joseywales72 » Jul 11, 2006 14:02

Hi, I think you should install build-essential package. Not sure because I am on Windows XP now, but try issuing a

Code: Select all

apt-get install build-essential
command in a terminal. There should be an entry in Synaptic as well.
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Postby {Nathan} » Jul 12, 2006 17:54

I tryed to compile with gui, and got this.

Code: Select all

/usr/share/freebasic/bin/linux/ld: cannot find -lX11
[/quote]
DrV
Site Admin
Posts: 2116
Joined: May 27, 2005 18:39
Location: Midwestern USA
Contact:

Postby DrV » Jul 12, 2006 17:59

Did you install the X11 libraries? (apt-get install libx11-6)
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Postby {Nathan} » Jul 12, 2006 18:19

When I do that, it tells me I already have the latest version.

Code: Select all

nathan@ubuntu:~/code$ sudo apt-get install libx11-6
Password:
Reading package lists... Done
Building dependency tree... Done
libx11-6 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
VirusScanner
Posts: 775
Joined: Jul 01, 2005 18:45

Postby VirusScanner » Jul 13, 2006 2:15

You have to install the -dev versions also.
E.K.Virtanen
Posts: 785
Joined: May 28, 2005 9:19
Location: Finland

Postby E.K.Virtanen » Jul 16, 2006 16:58

Nathan1993 wrote:I am running the latest version of Ubuntu (6.06 Dapper Drake). You no longer need to install the X11 library, You may want to note that.


I updated to Dapper at last week. Since i did have all necessary libs allready i didnt start to do this kind of new tut of installing fb to Dapper. Ill check it at next week when ill install dapper to my friend pc.
red_Marvin
Posts: 201
Joined: Nov 13, 2005 11:37
Location: Sweden
Contact:

Postby red_Marvin » Jul 16, 2006 20:17

apt-get (notice the lowercase, linux is case dependent) install build-essential installs more stuff than you need for fb (a c/c++ compiler and more I think)
southern cross
Posts: 2
Joined: Jul 20, 2006 6:47

Postby southern cross » Jul 20, 2006 6:54

lurah wrote:I updated to Dapper at last week. Since i did have all necessary libs allready i didnt start to do this kind of new tut of installing fb to Dapper. Ill check it at next week when ill install dapper to my friend pc.


Lurah,
Doesn't matter what I do I always get "cannot find -lc"

Looking forward for that tut for Dapper.
Thanks
SC
BastetFurry
Posts: 255
Joined: Jan 05, 2006 0:56

Postby BastetFurry » Jul 20, 2006 11:49

I had to install libncurses-dev and some X devel deb's first to make fb work, we realy need some kind of deb and rpm packages that resolve automagicaly.
{Nathan}
Posts: 301
Joined: Jun 04, 2005 15:18
Location: Ohio
Contact:

Postby {Nathan} » Jul 20, 2006 16:23

Yes, on the latest version of Dapper Drake I must install about 8 other dev libraries.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 0 guests