sfoster wrote:Code: Select all
/usr/share/freebasic/bin/linux/ld: cannot find -lc
This error message indicates that the file libc.so cannot be found. Typically that would be in the /usr/lib/ directory, but since it isn't usually needed except for development, it was probably omitted from your Puppy.
Since libc.so is missing, it is likely that others are as well. I don't know for sure which are needed, since it only complains when something is missing, but I do know that it complained about the following missing files when I tried
fbc on my Puppy 4.3.1:
-lc (libc.so)
-lm (libm.so)
-lpthread (libpthread.so)
-ldl (libdl.so)
-lncurses (libncurses.so)
My guess is that installing the appropriate *devx*.sfs for your Puppy (
lupu_devx_500.sfs if you are still using Puppy 5.0.0) will provide these files -- actually 3 symlinks and 2 GNU ld scripts -- as well as 2 other libraries needed by the GNU ld scripts.
But that is just a guess, since I didn't try this myself. I didn't want to download 90 MB just for 12
KB of stuff.
If you plan on doing other development work, you should go ahead and install the *devx*.sfs file. But if you will only be using freebasic and don't want to download 121 MB (for instance, if you were on dial-up), or if installing it doesn't solve the problem, let me know and I can tell you what I did manually for my Puppy 4.3.1.
Should you decide to try the manual solution, please post the output of the following commands, so we can adapt the procedure to your Puppy:
Code: Select all
find / -xdev -name libc.so -ls -o -name libm.so -ls -o -name libpthread.so -ls -o -name libdl.so -ls -o -name libncurses.so -ls
find / -xdev -name libc.so.? -ls -o -name libm.so.? -ls -o -name libpthread.so.? -ls -o -name libdl.so.? -ls -o -name libncurses.so.? -ls
(Note that the two commands are long, and the lines may wrap in your browser window, but they are really only one line each.)
Now, having said all of that, I do see a bit of a mystery here:
sfoster wrote:. . . but I did try compiling code from inside the terminal just to see if the problem was Freebasic's (from earlier), and that worked. It made a binary just fine.
Really? No error messages? Did the binary run okay? Can you think of anything that was different other than you were compiling in the terminal instead of in geany? Perhaps you had the *devx*.sfs file installed?
It surprises me that the loader would give that error when run from geany but not when run from a terminal. But if it does, all that I said about installing the *devx*.sfs file may not help you here. Although it still might be helpful to see the output of the two commands I suggested above.
(Oh, wait, I think maybe I see. You tried geany without your pup-save. So maybe you'll be fine with your pup-save.)
sfoster wrote:Oh, I should also mention before I sign off that the file was actually named hi.bas. I think bash just didn't print the file extension for some reason when it was relaying the message back to me. I think the new version does recognize .bas files because in one of the lower windows immediately below the editing pane, it says "file type: Freebasic."
Ah, thanks for reporting that it was recognized okay. That eliminates one possibile problem.
(By the way, bash didn't print the file extension in the error message because it was looking for the executable, which has no extension.)
I installed the new version of geany and played with it a bit. It appears that for some reason it cannot properly set the source file commands (such as the compile command). If you choose the last entry of the
Build menu (can't think of its name at the moment) you will see that the new version leaves the source file commands blank. This seems to be true for other file types as well, not just freebasic. Although you can fill it in yourself (
fbc -w all "%f") I would suggest sticking with the old version for now, in case there are similar bugs lurking in the new version (although I was able to get it to work, after filling in the command).
Good luck. Please keep us posted on your progress.