running FB on ubuntu question

Linux specific questions.
alfakilo
Posts: 117
Joined: Oct 02, 2009 9:18
Location: Estonia

running FB on ubuntu question

Postby alfakilo » Jul 29, 2014 16:21

Hi

am tryn to start discover Ubuntu but haveing many problems.
i tryed it one year ago and i quited because i didnt get even that far last time :D so i tryed again.. now seems like its installed but problem with understanding it.. how do i execute compiled code.

ubuntu 14.04 LTS 64 bit

This is what i do...


//navigateing into SH folder and executeing it...

cd /home/username/Desktop/FreeBASIC-0.90.1-linux
sudo ./install.sh -i

//probably installn some libs..
sudo apt-get install gcc-multilib g++-multilib
sudo apt-get install lib32ncurses5-dev
sudo apt-get install libx11-dev:i386 libxext-dev:i386 libxrender-dev:i386 libxrandr-dev:i386 libxpm-dev:i386

i have freebasic on ..
/home/username/Desktop/FreeBASIC-0.90.1-linux

i put file hello.bas into BIN folder

with contents
print "Hello from FreeBASIC!"
sleep

//i execute command in terminal
fbc hello.bas

it generates file called "hello" (executable probably) ,
(into folder /home/username/Desktop/FreeBASIC-0.90.1-linux/bin))
(but not print anything... supposed to print "Hello from FreeBASIC!")
now the big question .. how can i run it , so it prints text "Hello from FreeBASIC!" (probably in terminal)



also i have FBC in folder /usr/local/bin

so what i need exactly ? any good advice for non ubuntu expert.
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: running FB on ubuntu question

Postby dkl » Jul 29, 2014 18:23

Just do (in a terminal):

1. fbc foo.bas
2. ./foo

You can probably also run the executables by double-clicking them in a file explorer, but note that Linux systems usually won't automatically open a terminal/console window like Windows, so the program will run but you can't see it. This method is more useful for GUI programs (which create a visible window themselves) than console programs.

By the way, it's not necessary to work inside the FreeBASIC/bin/ directory. Also, if you have installed FB into /usr/local then you can aswell delete the extracted Desktop/FreeBASIC-0.90.1-linux/ directory (unless you want to keep it for later).
alfakilo
Posts: 117
Joined: Oct 02, 2009 9:18
Location: Estonia

Re: running FB on ubuntu question

Postby alfakilo » Jul 29, 2014 18:51

Thank u dkl

It works :D
jdebord
Posts: 519
Joined: May 27, 2005 6:20
Location: Limoges, France
Contact:

Re: running FB on ubuntu question

Postby jdebord » Jul 30, 2014 9:14

dkl wrote:Also, if you have installed FB into /usr/local then you can aswell delete the extracted Desktop/FreeBASIC-0.90.1-linux/ directory (unless you want to keep it for later).

You may wish to keep the example programs since they are not installed (if I remember correctly).
alfakilo
Posts: 117
Joined: Oct 02, 2009 9:18
Location: Estonia

Re: running FB on ubuntu question

Postby alfakilo » Jul 30, 2014 16:40

jdebord
Yes examples are stored in this folder and not installed by install process..

Also i have WIN32 GUI examples ??? am i able to run them somehow ?
/home/&username/Desktop/Untitled Folder/linuxtöötab/FreeBASIC-0.90.1-linux/examples/GUI/win32
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: running FB on ubuntu question

Postby dkl » Jul 30, 2014 17:31

No, they're for Win32, not for Linux, so they're not really useful in the Linux package except perhaps for the purpose of cross-compiling.
alfakilo
Posts: 117
Joined: Oct 02, 2009 9:18
Location: Estonia

Re: running FB on ubuntu question

Postby alfakilo » Aug 05, 2014 16:11

/home/user/Desktop/Untitled Folder/linuxtöötab/FreeBASIC-0.90.1-linux/examples/GUI/GTK+/Tutorials/...any

ld: cannot find -lgtk-x11-2.0
ld: cannot find -lgdk-x11-2.0
ld: cannot find -lgio-2.0
ld: cannot find -lgobject-2.0
ld: cannot find -lglib-2.0
ld: cannot find -lgmodule-2.0
ld: cannot find -lcairo
ld: cannot find -lpango-1.0
ld: cannot find -lgdk_pixbuf-2.0
ld: cannot find -lpangocairo-1.0
ld: cannot find -latk-1.0

What should i do ??

probably i have to do.----
sudo apt-get install XXXXX

Where i find info what i need to do ?
i cant do : sudo apt-get install lgtk-x11-2.0 and so on..
dkl
Site Admin
Posts: 3209
Joined: Jul 28, 2005 14:45
Location: Germany

Re: running FB on ubuntu question

Postby dkl » Aug 05, 2014 16:42

I don't know where Ubuntu has documentation on how to install 32bit GTK development libraries on 64bit system, but from my experience, it would be either the libgtk2.0-dev:i386 or ia32-libs packages.

This thread was about the same problem for Debian: http://www.freebasic.net/forum/viewtopic.php?f=5&t=22613
badidea
Posts: 1457
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: running FB on ubuntu question

Postby badidea » Aug 05, 2014 22:37

I think the ia32-libs have been removed from the Ubuntu repositories. I usually search for libxxxx-dev:i386, where xxxx is determined by some searching in the synaptic package manager or by googling if that fails.
In synaptic: select Architecture (bottom-left) and then arch:i386 (on the left) to show all 32 bit stuff, 25980 items :-)
E.g.: For -lcairo, I would search for libcairo and then select something that ends with -dev. So probably libcairo2-dev:i386, but I am not sure, I don't have that one installed at the moment.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest