FreeBASIC for Apple OS
FreeBASIC for Apple OS
Hello my friend
Today I have a little question, because some people ask me for a simple language where can do some experiment without learning everythings and step by step learn enough to become a better programmer, but he use a MAC and in the download area is not available the version for MAC.
From what I read, the first version of FreeBASIC was written in C, consequently any operating system that has the GCC (GNU Compiler Collection) is able to compile FreeBASIC until generating the autocompilable version written in FreeBASIC, if this is correct Why isn't there a Mac OS version ready for download?
I ave non Mac and I cant make the executable but someone can confirm that are possible make a compiler for MAC ?
If are possible I can download the source code from beginning and compile each version until last one.
Thank you.
Today I have a little question, because some people ask me for a simple language where can do some experiment without learning everythings and step by step learn enough to become a better programmer, but he use a MAC and in the download area is not available the version for MAC.
From what I read, the first version of FreeBASIC was written in C, consequently any operating system that has the GCC (GNU Compiler Collection) is able to compile FreeBASIC until generating the autocompilable version written in FreeBASIC, if this is correct Why isn't there a Mac OS version ready for download?
I ave non Mac and I cant make the executable but someone can confirm that are possible make a compiler for MAC ?
If are possible I can download the source code from beginning and compile each version until last one.
Thank you.
Re: FreeBASIC for Apple OS
The first version of FreeBasic was written in Visual Basic for DOS, until it became self compiling. Only the runtime library was written in C
And actually there was an unofficial version of FreeBasic for Apple OS: viewtopic.php?t=28640
And actually there was an unofficial version of FreeBasic for Apple OS: viewtopic.php?t=28640
Re: FreeBASIC for Apple OS
Thank you , that explain many things
I must admit that using Apple systems creates a big stomach ache, to the point that I installed Linux on 6 older Macs and Windows on the recent ones. From my point of view it is not a pleasant operating system to use.
Re: FreeBASIC for Apple OS
do you think the BSD version work on mac os too ?
Re: FreeBASIC for Apple OS
That's where the person who did the port started if I recall correctly. Used the GCC backend, and compiled from the bootstrap C sources. I can't remember it used X11 for graphics or not. Since SDL runs natively on macOS, and FB has an SDL-based graphics library backend, it might be possible to generate "native" apps. And once there's a running version, it can be used to compile FB from .bas sources, rather than bootstrap C sources.
Since macOS is unix, it's usually possible to compile unix software on it and it should run with few changes. Not always easy for the uninitiated, though. I used to run all sorts of unix software on my powerbook back in the day. Apps from Gnome, KDE, etc.
Since macOS is unix, it's usually possible to compile unix software on it and it should run with few changes. Not always easy for the uninitiated, though. I used to run all sorts of unix software on my powerbook back in the day. Apps from Gnome, KDE, etc.
Re: FreeBASIC for Apple OS
don't know if this will help, here's TeeEmCee's old build from 2016 viewtopic.php?p=263759#p263759
and my own build for Mojave [edit] I had hell uploading that archive without the binaries being deleted, will try again and post a link
note that TeeEmCee is the expert on this, I barely know enough to open a terminal and then build FB with the command: make FBFLAGS="-asm att" ENABLE_XQUARTZ=1 all
provided that you already have a version of FB installed
my mac is from 2012 and is barely able to run MacOS Mojave and the OS has changed a lot since that version
note that TeeEmCee is the expert on this, I barely know enough to open a terminal and then build FB with the command: make FBFLAGS="-asm att" ENABLE_XQUARTZ=1 all
provided that you already have a version of FB installed
my mac is from 2012 and is barely able to run MacOS Mojave and the OS has changed a lot since that version
Re: FreeBASIC for Apple OS
ok, here's FB-1.07 for Mojave https://u.pcloud.link/publink/show?code ... 8zh8Q8UbjV
Re: FreeBASIC for Apple OS
in MacOS Mojave when trying to build the latest Git repo I get unknown ld option --eh-frame-hdr at the stage of linking fbc, have no idea why
Re: FreeBASIC for Apple OS
I believe that the system created by Apple for installing applications, made for those who understand nothing about IT, makes it the only solution for those who do not want to learn and at the same time complicates the life of those who have studied and know that with a PC you can do much more than surf the internet on social media, I was hoping for a solution like compiling a BAS file where it can use GTK libraries as happens in Windows, Linux and BSD, but it seems that the generated executable file does not work on other Macs if you do not install all the necessary software and it seems excessively cumbersome to me.
As soon as I have a break from work I will start studying it and looking for a simple solution that even those who are new to the environment do not have to carry out complicated and too many steps.
Re: FreeBASIC for Apple OS
eh-frame is afaik support for ELF/Dwarf exception frames. OS X' binary format however, is not ELF, but MachO. Note that therefore the binutils (LD and AS and maybe more) are different. SED also might be BSD sed rather than gsed and the default shell is often a SH variant and not bash.
BSD binaries won't run, though while porting there will be many similarities between FreeBSD and OS X in things like structures, but few guarantees.
iOS+OS X also changes CPU architecture (m68k, PPC, PPC64, x86, x86_64 and various ARM types and generations) every other years, and every so many and many years their OS X has some breaking feature that requires adjustment in the toolchain.
Re: FreeBASIC for Apple OS
Back in early 2022 the commit "Further flag required for ld on linux" mistakenly added --eh-frame-hdr to the ld commandline on all Unices. My best guess is it should be all Unices except Darwin, as marcov said. Delete FB_COMPTARGET_DARWIN from the select case in hLinkFiles in fbc.bas that adds that flag and see whether it works then? I think you'll probably have to make further fixes, I think I've heard other problems mentioned. I haven't tried to compile for Mac in a long time and can't do it any time soon, no Mac access.
Re: FreeBASIC for Apple OS
thank you marcov and thank you TeeEmCee for pointing me in the right direction, my Mac is retired and use a Windows PC but I occasionally fire-up the old Mac
I plan on trying your recommendation later today
I plan on trying your recommendation later today
Re: FreeBASIC for Apple OS
hello TeeEmCee
there was only one place in fbc.bas where eh-frame-hdr was added to the ld command, commenting that out solved the issue and the latest FB Git repo built without problems, many thanks
there was only one place in fbc.bas where eh-frame-hdr was added to the ld command, commenting that out solved the issue and the latest FB Git repo built without problems, many thanks
Re: FreeBASIC for Apple OS
there were 3 downloads of FB-Mojave so I updated to the latest Git repo https://u.pcloud.link/publink/show?code ... 8zh8Q8UbjV
I would be interested to know if this was in any way helpful, also, if you were able to build FB, share here your experience for others to profit from
I would be interested to know if this was in any way helpful, also, if you were able to build FB, share here your experience for others to profit from
-
- Posts: 1
- Joined: Sep 23, 2023 21:15
Re: FreeBASIC for Apple OS
This was fantastic, I'm running it on an M2 Mac Arm (it runs through Rosetta fine) but it works perfectly well, you might consider uploading your code into Github and dropping this as a release. It's asked for quite often. I was working on it previously and the older version of FBC self-compiling was giving me a difficult time.srvaldez wrote: ↑Nov 02, 2023 19:07 there were 3 downloads of FB-Mojave so I updated to the latest Git repo https://u.pcloud.link/publink/show?code ... 8zh8Q8UbjV
I would be interested to know if this was in any way helpful, also, if you were able to build FB, share here your experience for others to profit from