Just installed... trying to compile... not sure if OK
Just installed... trying to compile... not sure if OK
I am rather new to Linux, let me tell you. I have Ubuntu 6.06LTS. What I did is download the tar.gz file for FreeBASIC 0.18.3b installation. I decompressed it (both through the GUI and console seem to work fine). I got inside the directory and ran:
sudo ./install.sh -i
as instructed by the reamde file. After that, I was able to run the fbc program alone and help came up, but when I try to compile a bas file like this:
fbc myfile.bas
nothing happens... and I mean NOTHING. I had a problem before. Earlier I had downloaded a previous version of FreeBASIC and what I got was different. I was also able to run fbc alone and get help, but at compilation time, I used to get and error telling "-lc not found". Since the moment I overwrote that with the new one, nothing happens.
I am sure I must be doing something wrong, as I don't understand Linux very well. I tried to find an answer without creating a new post, but guys you are much more advanced than I am and I got lost in the posts.
Also I read I can have problems to compile graphics and stuff if I don't download or setup certain libraries. Do I have to do anything else? How exactly do I get the program up and running so that I can start programming everything?
Sorry to make such a general and typical question. I promise I will get better at FreeBASIC for Linux soon. Thanks.[/i]
sudo ./install.sh -i
as instructed by the reamde file. After that, I was able to run the fbc program alone and help came up, but when I try to compile a bas file like this:
fbc myfile.bas
nothing happens... and I mean NOTHING. I had a problem before. Earlier I had downloaded a previous version of FreeBASIC and what I got was different. I was also able to run fbc alone and get help, but at compilation time, I used to get and error telling "-lc not found". Since the moment I overwrote that with the new one, nothing happens.
I am sure I must be doing something wrong, as I don't understand Linux very well. I tried to find an answer without creating a new post, but guys you are much more advanced than I am and I got lost in the posts.
Also I read I can have problems to compile graphics and stuff if I don't download or setup certain libraries. Do I have to do anything else? How exactly do I get the program up and running so that I can start programming everything?
Sorry to make such a general and typical question. I promise I will get better at FreeBASIC for Linux soon. Thanks.[/i]
Checked!!
Well... this is what I got:
- when doing fbc myfile.bas or fbc ./myfile.bas the result is the same: no output and no effect or new file created
- when using a non-existing file as a parameter, fbc reacts immediately telling the file has not been found, so the problem is not about recognizing what has been instructed or where the file is
- running fbc from any directory and calling ./fbc produce the same result. It makes no difference whether we are located on the same directory as the fbc executable or not
- including the -v option (that is, fbc -v myfile.bas) causes the compiler to produce this output:
- when doing fbc myfile.bas or fbc ./myfile.bas the result is the same: no output and no effect or new file created
- when using a non-existing file as a parameter, fbc reacts immediately telling the file has not been found, so the problem is not about recognizing what has been instructed or where the file is
- running fbc from any directory and calling ./fbc produce the same result. It makes no difference whether we are located on the same directory as the fbc executable or not
- including the -v option (that is, fbc -v myfile.bas) causes the compiler to produce this output:
No file is created. Please help :(FreeBASIC Compiler - Version 0.18.3 (12-28-2007) for linux (target:linux)
Copyright (C) 2004-2007 The FreeBASIC development team.
compiling: myfile.bas -o myfile.asm
assembling: as --strip-local-absolute "myfile.asm" -o "myfile.o"
Found partial solution
The files did already have the +x attribute. I found the first problem, anyway. There was a link for fbc in usr, but none for ar, al, and ld. When I created the links, I got fbc doing some more stuff, but still not file is generated. What I get is:
Can you give me a hand with this, please?lucas@ubuntu-lucas:~$ fbc -v myfile.bas
FreeBASIC Compiler - Version 0.18.3 (12-28-2007) for linux (target:linux)
Copyright (C) 2004-2007 The FreeBASIC development team.
compiling: myfile.bas -o myfile.asm
assembling: as --strip-local-absolute "myfile.asm" -o "myfile.o"
linking: -dynamic-linker /lib/ld-linux.so.2 -T "/usr/share/freebasic/bin/linux/elf_i386.x" -s -L "/usr/share/freebasic/lib/linux" -L "./" -L "/usr/local/lib" -L "/lib" -L "/usr/lib" "/usr/share/freebasic/lib/linux/crt1.o" "/usr/share/freebasic/lib/linux/crti.o" "/usr/share/freebasic/lib/linux/crtbegin.o" "myfile.o" "$$fb_icon$$.o" -o "myfile" -( -lfb -lgcc -lc -lm -lpthread -ldl -lncurses -lsupc++ -lgcc_eh "/usr/share/freebasic/lib/linux/fbrt0.o" -) "/usr/share/freebasic/lib/linux/crtend.o" "/usr/share/freebasic/lib/linux/crtn.o"
ld: cannot find -lc
for cannot find -lc, it should be a case of
aptitude install libc6-dev
however, if you don't even have libc6-dev you are probably missing a fair bunch of stuff, i would recommend a line like this, that should cover all or most of what you need for FB
aptitude install libc-dev binutils binutils-dev libncurses-dev xorg-dev build-essential
aptitude install libc6-dev
however, if you don't even have libc6-dev you are probably missing a fair bunch of stuff, i would recommend a line like this, that should cover all or most of what you need for FB
aptitude install libc-dev binutils binutils-dev libncurses-dev xorg-dev build-essential
-
- Posts: 2428
- Joined: Jul 19, 2006 19:17
- Location: Sunnyvale, CA
- Contact:
You can tell by the "dev" in "libc6-dev" that it is only needed for compiling the program.Cas wrote:IT WOOOOOOOOOOOOORKED!!!!!!!!!!!!!!!!!!!!!!!!
THANK YOU!
Just a question... if I make a program, and somebody downloads it.... will they need all this stuff installed on their systems so that they can use my application?
Thanks again.
The end user won't need it. ;-)
Without the permissions set on as, ld, ar there is a silent fail -Have a look at the freebasic/bin/linux/ directory, and check the perms on the as, ld and ar binaries, they may not be set to +x, i'm pretty sure that can cause a silent fail.
only the -r option showed me that FB was doing anything (leaving the ASM file).
Then after setting permissions, I got the -lc error message too.
Thanks yetifoot, that sorted my installation.aptitude install libc-dev binutils binutils-dev libncurses-dev xorg-dev build-essential