Mac FB?
I don't think the problem is as much how close it is to Linux, but really deals with the graphical back-end. Quartz (or whatever system Mac has these days) is very different from WinAPI and Xorg stuff, and as previously mentioned, none of the *devs* have a Mac. It is all well and good if members of the forum have macs, but it would be a huge waste of time for them to write code, send it, get feedback, debug, send again, feedback again, etc.
One thing we should be asking is: what do we build on, intel or mac processor? It looks like mac is moving most of their newer stuff onto intel, which may be good for translating the code, and may not be.
A good approach would be, if you have a decent knowledge of C, to svn FreeBASIC's source code, and without editing, from it through X-Code (is that still what Mac uses?). What sort of dependencies does it ask for? Are they available to Macs? Another step would be finding another open source language that supports windows, mac and linux. What sort of dependencies does it rely on? Is there any code that can be gleaned from it?
None of this is just an over night fun time. It would take a lot of time and effort, which I know I don't have, and I wouldn't blame the devs if they don't have that sort of time either. Not to say there is no hope, but if any members of the community can contribute, make sure you personally get in touch with the devs and get things rolling.
Anywho, I'll leave things at that.
Merry Christmas, my fellow FreeBASIC programmers,
-Alex
One thing we should be asking is: what do we build on, intel or mac processor? It looks like mac is moving most of their newer stuff onto intel, which may be good for translating the code, and may not be.
A good approach would be, if you have a decent knowledge of C, to svn FreeBASIC's source code, and without editing, from it through X-Code (is that still what Mac uses?). What sort of dependencies does it ask for? Are they available to Macs? Another step would be finding another open source language that supports windows, mac and linux. What sort of dependencies does it rely on? Is there any code that can be gleaned from it?
None of this is just an over night fun time. It would take a lot of time and effort, which I know I don't have, and I wouldn't blame the devs if they don't have that sort of time either. Not to say there is no hope, but if any members of the community can contribute, make sure you personally get in touch with the devs and get things rolling.
Anywho, I'll leave things at that.
Merry Christmas, my fellow FreeBASIC programmers,
-Alex
Well, we do have multiple devs, but perhaps only one dev who is active currently.
Ya, I've been out of touch with the Mac world for about 10 years, and only pay attention to a few snippets of news here and there. I used to have a much older mac, prior to the OS X days (much closer to the Windows 3.1 days).
I will be getting, in January or Febuary (whenever funds permit), Mac OS for my intel computer, and I'll definitely do some fiddling with the FB source code. It will be glorious.
Ya, I've been out of touch with the Mac world for about 10 years, and only pay attention to a few snippets of news here and there. I used to have a much older mac, prior to the OS X days (much closer to the Windows 3.1 days).
I will be getting, in January or Febuary (whenever funds permit), Mac OS for my intel computer, and I'll definitely do some fiddling with the FB source code. It will be glorious.
I'm currently on my girlfriend's intel macbook, and fbc runs fine through wine. I installed wine via git respos, with very little issue (although I can't get he quartz driver to work, but the x11 works good for just doing terminal emulation).
I also tried running a few programs compiled by fbc (which I had no doubt would work, but just testing), and I had absolutely no problem. From asking around a lot of mac users, most of them use wine quite regularly, and isn't much hassle. Maybe we don't even need a mac port, at least for the time being.
I'll probably have a good amount of access to her macbook over this next semester, so I'm going to read over some of the fbc source and see what can be done for compiling it on a mac. If anyone has done some code, if you can direct me there, that would be super.
Take care,
-Oz
I also tried running a few programs compiled by fbc (which I had no doubt would work, but just testing), and I had absolutely no problem. From asking around a lot of mac users, most of them use wine quite regularly, and isn't much hassle. Maybe we don't even need a mac port, at least for the time being.
I'll probably have a good amount of access to her macbook over this next semester, so I'm going to read over some of the fbc source and see what can be done for compiling it on a mac. If anyone has done some code, if you can direct me there, that would be super.
Take care,
-Oz
Pottersson wrote:I'd think that, in theory, a Mac port should come from the Linux version, you know, considering the *NIX they both share. But I am by no means an expert. I wonder, though, if I could get a simple Hello World program compiled for Linux to run...
Wouldn't work for some dumb reasons - the executables are not in the same format, for one. Linux uses AT&T SVr4 ELF and Mac OS X (and Darwin) uses the Mach-O format which it inherited from NeXTSTEP.
Secondly, the core system libraries on Linux are libc, libpthread, libm, libdl, etc., whereas on Mac OS X (and Darwin), this is all bundled into libSystem.
Now, I can see running simple programs from Linux on Mac OS X, say, a simple "Hello, World!" CLI app or so, but that'd take a ELF loader and a system to map the Linux libc calls to Darwin libSystem functions. Extremely difficult, but not impossible. I once compiled a trivial C app on FreeBSD 6.x and then, after a bit of trickery, ran the same binary on a Linux system without modification. However, for programs of any real functionality, this doesn't work as there are symbols in e.g. the FreeBSD libc that do not exist in glibc.
TL;DR: Don't bother, running Linux binaries on Mac OS X does not work, and making it work would involve far too much work
segin wrote:Pottersson wrote:I'd think that, in theory, a Mac port should come from the Linux version, you know, considering the *NIX they both share. But I am by no means an expert. I wonder, though, if I could get a simple Hello World program compiled for Linux to run...
Wouldn't work for some dumb reasons - the executables are not in the same format, for one. Linux uses AT&T SVr4 ELF and Mac OS X (and Darwin) uses the Mach-O format which it inherited from NeXTSTEP.
And on IA32 more SysV like ABI (http://personal.denison.edu/~bressoud/c ... velABI.pdf) :
the IA-32 architecture and whether their value is preserved after a subroutine call.
The function calling conventions used in the IA-32 environment are the same as those used in the
System V IA-32 ABI, with the following exceptions:
■ Structures 8 bytes or smaller in size are returned in registers
■ The stack is 16-byte aligned
■ Large data types (larger than 4 bytes) are kept at their natural alignment
Note that crosscompiling is a $#@$& since binutils don't support Darwin/OSX iirc, and you have to hand compile CCTOOLS.
It is possible though, I compiled a complete Lazarus IDE (gui Carbon app) to OS X 10.4/ppc from both Linux and windows.
As far as as GUI goes, there are several choices:
- Use X11 with GTK2
- use the native QT port.
- Use Carbon (but not on 64-bit x86)
- Cocoa is the advised widgetset, but it is specified in Objective C, which is a pain. Moreover it is Mac only.
- Owner drawn using Quartz
- owner drawn using OpenGL
Return to “Community Discussion”
Who is online
Users browsing this forum: No registered users and 6 guests