D.gnu - Mac D Stuff
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (17/17) May 29 2005 With the basics (i.e. the compiler) out of the way,
- Kris (5/22) May 29 2005 Hi Anders ~ does Mango compile on OS X now? I saw David's post about a f...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/8) May 29 2005 Haven't tested it, but it looked like David was able to compile it at
- David Friedman (3/17) May 29 2005 I only tried compiling the files in the mango_release_1-3.zip package.
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (22/23) May 30 2005 Build 2.07 did not work, but Build 2.08 did...
- Kris (7/30) May 30 2005 Thanks for pointing out the va_list thing ... shameful behaviour on my p...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (18/22) May 30 2005 Not really, it's what is listed in the offical documentation.
- Kris (7/15) May 30 2005 and
- Kris (8/24) May 30 2005 Ack; I'm a bit slow today. I just twigged that you don't have the barf f...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (5/8) May 30 2005 After much discussion, it finally settled on: Unix and std.c.unix.unix
- clayasaurus (8/34) May 30 2005 It wouldn't be too hard for derelict to work on mac osx, would it? You'd...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (10/17) May 30 2005 Nope, but it's not really worth the trouble. (IMHO, at least)
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (9/13) May 30 2005 Seems like the new and improved dsource forums won't let me log in...
- clayasaurus (5/53) May 30 2005 Humm... I think what's supposed to happen is if you try to login with an...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (5/9) May 30 2005 Not really, I didn't feel like hunting through the BAT and BRF files...
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (3/6) May 30 2005 Looks like it batched the emails, I got three of them - six hours later.
With the basics (i.e. the compiler) out of the way, I will probably post some more interesting stuff: - Using Xcode Tools to build and debug D programs (calling the GDC compiler and the GDB debugger) - Using SDL and OpenGL/GLUT from D, on Mac OS X (Derelict doesn't work, and isn't really needed) Both of it works fine at the moment, just haven't packaged it up "nicely" and updated it just yet... With the latest GDC version it's really easy to start using developing with D, on the Mac OS X platform too. It would be nice if there was some Free (i.e. GNU FDL) documentation for the GDC compiler available with it ? But I won't have the time to write it myself, neither do any Carbon/GUI applications with D for Mac OS X... It's all being left "as an exercise for the reader" ;-) (there are some documentation bits available on Wiki4D) --anders
May 29 2005
Hi Anders ~ does Mango compile on OS X now? I saw David's post about a fix there ... - Kris "Anders F Björklund" <afb algonet.se> wrote in message news:d7del3$cdb$1 digitaldaemon.com...With the basics (i.e. the compiler) out of the way, I will probably post some more interesting stuff: - Using Xcode Tools to build and debug D programs (calling the GDC compiler and the GDB debugger) - Using SDL and OpenGL/GLUT from D, on Mac OS X (Derelict doesn't work, and isn't really needed) Both of it works fine at the moment, just haven't packaged it up "nicely" and updated it just yet... With the latest GDC version it's really easy to start using developing with D, on the Mac OS X platform too. It would be nice if there was some Free (i.e. GNU FDL) documentation for the GDC compiler available with it ? But I won't have the time to write it myself, neither do any Carbon/GUI applications with D for Mac OS X... It's all being left "as an exercise for the reader" ;-) (there are some documentation bits available on Wiki4D) --anders
May 29 2005
Kris wrote:Hi Anders ~ does Mango compile on OS X now? I saw David's post about a fix there ...Haven't tested it, but it looked like David was able to compile it at least ? (didn't say whether it ran the tests without crashing, though) Downloaded mango-1.4, but it looks like it requires Build these days ? Meaning that I first have to download and compile build-2.07 for Mac... --anders
May 29 2005
Anders F Björklund wrote:Kris wrote:I only tried compiling the files in the mango_release_1-3.zip package. DavidHi Anders ~ does Mango compile on OS X now? I saw David's post about a fix there ...Haven't tested it, but it looked like David was able to compile it at least ? (didn't say whether it ran the tests without crashing, though) Downloaded mango-1.4, but it looks like it requires Build these days ? Meaning that I first have to download and compile build-2.07 for Mac... --anders
May 29 2005
Kris wrote:Hi Anders ~ does Mango compile on OS X now?Build 2.07 did not work, but Build 2.08 did... (still trying to figure out the /barf stuff) Seems to still be some problems with varargs: mango/io/DisplayWriter.d:154: function mango.io.DisplayWriter.DisplayWriter.print called with argument types: (char[],TypeInfo [],char*) matches both: mango.io.DisplayWriter.DisplayWriter.print(char[],TypeInfo [],void*) and: mango.io.DisplayWriter.DisplayWriter.print(char[],...) I'll continue with the old workaround to rename one of them, and will also change the argptr to the proper "va_list" type. For some reason Walter will not change the documentation ? (the stuff about variadic functions is not portable from DMD) The only way is to use the std.stdarg module and templates. version (DigitalMars) { alias void* va_list; } Seems to compile alright now, but Build can't find the objects to make a library (it thinks they should be with the sources?) Then I need to investigate how to build some Mango examples. --anders
May 30 2005
Thanks for pointing out the va_list thing ... shameful behaviour on my part. mango examples now have brf file (terrible name <g>). You don't need to create a Mango library to build them ~ the whole thing should compile and link directly? Cheers! "Anders F Björklund" <afb algonet.se> wrote in message news:d7f46f$23fj$1 digitaldaemon.com...Kris wrote:Hi Anders ~ does Mango compile on OS X now?Build 2.07 did not work, but Build 2.08 did... (still trying to figure out the /barf stuff) Seems to still be some problems with varargs: mango/io/DisplayWriter.d:154: function mango.io.DisplayWriter.DisplayWriter.print called with argument types: (char[],TypeInfo [],char*) matches both: mango.io.DisplayWriter.DisplayWriter.print(char[],TypeInfo [],void*) and: mango.io.DisplayWriter.DisplayWriter.print(char[],...) I'll continue with the old workaround to rename one of them, and will also change the argptr to the proper "va_list" type. For some reason Walter will not change the documentation ? (the stuff about variadic functions is not portable from DMD) The only way is to use the std.stdarg module and templates. version (DigitalMars) { alias void* va_list; } Seems to compile alright now, but Build can't find the objects to make a library (it thinks they should be with the sources?) Then I need to investigate how to build some Mango examples. --anders
May 30 2005
Kris wrote:Thanks for pointing out the va_list thing ... shameful behaviour on my part.Not really, it's what is listed in the offical documentation. There is still no way to, say, strip the first element out and pass the rest of them on. And most TypeInfo is still broken. (like if you want to separate between pointer types, for instance)mango examples now have brf file (terrible name <g>). You don't need to create a Mango library to build them ~ the whole thing should compile and link directly?Well, that's what I'm doing. Still takes quite a while to compile... I ran into a little barrage of "assert(0);" when trying to do it from the commandline directly (since I didn't define -version=Posix, just the default GDC definition of Unix which is the final word there) Then build tried to pass the DMD syntax arguments onto "gdc", I must teach it to use "gdmd" instead with that kind of syntax. (along with finding the object files it creates, in the first place, and also stop trying to find std/c/stdio.o and the rest of Phobos) I'm used to building for Unix/Linux, so this Windows stuff is "alien". (bat files and reponse files and lions, oh my!) Getting the hang of it. Biggest "problem" is that the character messes with tab completion ? Probably is a whole lot easier on the supported platforms, and with DMD. --anders
May 30 2005
Inline: "Anders F Björklund" <afb algonet.se> wroteKris wrote:andmango examples now have brf file (terrible name <g>). You don't need to create a Mango library to build them ~ the whole thing should compileHmmm; that's unfavourable.link directly?Well, that's what I'm doing. Still takes quite a while to compile...I ran into a little barrage of "assert(0);" when trying to do it from the commandline directly (since I didn't define -version=Posix, just the default GDC definition of Unix which is the final word there)Yeah; I'm wondering what to do about that. Mango uses version('Posix'){}where appropriate, partly because there was no established practice. Is there a concensus between DMD and GDC on this one?
May 30 2005
Ack; I'm a bit slow today. I just twigged that you don't have the barf files for building Mango libraries, because I failed to add them into the download (thanks to Carlos for pointing that out). You'll find them over here: http://svn.dsource.org/projects/mango/trunk/build/ Hope that will help somewhat. "Kris" <fu bar.com> wrote in message news:d7g6vc$4qv$1 digitaldaemon.com...Inline: "Anders F Björklund" <afb algonet.se> wrotetoKris wrote:mango examples now have brf file (terrible name <g>). You don't needestablishedandcreate a Mango library to build them ~ the whole thing should compileHmmm; that's unfavourable.link directly?Well, that's what I'm doing. Still takes quite a while to compile...I ran into a little barrage of "assert(0);" when trying to do it from the commandline directly (since I didn't define -version=Posix, just the default GDC definition of Unix which is the final word there)Yeah; I'm wondering what to do about that. Mango uses version('Posix'){}where appropriate, partly because there was nopractice. Is there a concensus between DMD and GDC on this one?
May 30 2005
Kris wrote:Yeah; I'm wondering what to do about that. Mango uses version('Posix'){}where appropriate, partly because there was no established practice. Is there a concensus between DMD and GDC on this one?After much discussion, it finally settled on: Unix and std.c.unix.unix This is the GDC standard, since DMD doesn't support anything but linux. Using "Posix", like in Mango, is OK too since you set it up yourself. --anders
May 30 2005
Anders F Björklund wrote:With the basics (i.e. the compiler) out of the way, I will probably post some more interesting stuff: - Using Xcode Tools to build and debug D programs (calling the GDC compiler and the GDB debugger) - Using SDL and OpenGL/GLUT from D, on Mac OS X (Derelict doesn't work, and isn't really needed)It wouldn't be too hard for derelict to work on mac osx, would it? You'd just need to add a version(OSX) and then change one file, derelict loader.d, to make use of the macs dynamic loader library which, as far as I can tell, uses the same dlopen, dlclose, and dlsym methods as linux. links... http://svn.dsource.org/projects/derelict/trunk/DerelictUtil/derelict/util/loader.dBoth of it works fine at the moment, just haven't packaged it up "nicely" and updated it just yet... With the latest GDC version it's really easy to start using developing with D, on the Mac OS X platform too. It would be nice if there was some Free (i.e. GNU FDL) documentation for the GDC compiler available with it ? But I won't have the time to write it myself, neither do any Carbon/GUI applications with D for Mac OS X... It's all being left "as an exercise for the reader" ;-) (there are some documentation bits available on Wiki4D) --anders
May 30 2005
clayasaurus wrote:Nope, but it's not really worth the trouble. (IMHO, at least) I added Mac to an earlier version, but it was "forgotten"... Easier to just use the regular headers, ported over from C ? And call the shared library / framework functions directly.- Using SDL and OpenGL/GLUT from D, on Mac OS X (Derelict doesn't work, and isn't really needed)It wouldn't be too hard for derelict to work on mac osx, would it?You'd just need to add a version(OSX) and then change one file, derelict loader.d, to make use of the macs dynamic loader library which, as far as I can tell, uses the same dlopen, dlclose, and dlsym methods as linux.Yes, you will need the "dlcompat" library from DarwinPorts. Then you need to hardcode the absolute path to your frameworks, and provide a version of SDLmain that works with the D runtime. I think the derelict is using a D work-alike for the SDLmain ? --anders
May 30 2005
clayasaurus wrote:It wouldn't be too hard for derelict to work on mac osx, would it? You'd just need to add a version(OSX) and then change one file, derelict loader.d, to make use of the macs dynamic loader library which, as far as I can tell, uses the same dlopen, dlclose, and dlsym methods as linux.Seems like the new and improved dsource forums won't let me log in... Here's the patch. (real name for "OSX" is darwin, but Unix is better) Paths to be loading on Darwin are: /System/Library/Frameworks/OpenGL.framework/OpenGL /Library/Frameworks/SDL.framework/SDL And here is the "dl" library, for Mac OS X versions before Panther: http://www.opendarwin.org/projects/dlcompat/ --anders
May 30 2005
Anders F Björklund wrote:clayasaurus wrote:Humm... I think what's supposed to happen is if you try to login with an existing username, it sends you an email with a new password. Anyway, I put a topic on the derelict forums for you :)It wouldn't be too hard for derelict to work on mac osx, would it? You'd just need to add a version(OSX) and then change one file, derelict loader.d, to make use of the macs dynamic loader library which, as far as I can tell, uses the same dlopen, dlclose, and dlsym methods as linux.Seems like the new and improved dsource forums won't let me log in...Here's the patch. (real name for "OSX" is darwin, but Unix is better) Paths to be loading on Darwin are: /System/Library/Frameworks/OpenGL.framework/OpenGL /Library/Frameworks/SDL.framework/SDL And here is the "dl" library, for Mac OS X versions before Panther: http://www.opendarwin.org/projects/dlcompat/ --andersneat. very small. so does this mean you got derelict to work on the mac? :)------------------------------------------------------------------------ Index: DerelictUtil/derelict/util/loader.d =================================================================== --- DerelictUtil/derelict/util/loader.d (revision 113) +++ DerelictUtil/derelict/util/loader.d (working copy) -6,6 +6,9 import std.string; } +version(DigitalMars) + version(linux) + version = Unix; private alias void* SharedLibHandle; -81,7 +84,7 } } -else version(linux) +else version(Unix) { extern(C) {
May 30 2005
clayasaurus wrote:Humm... I think what's supposed to happen is if you try to login with an existing username, it sends you an email with a new password. Anyway, I put a topic on the derelict forums for you :)Yeah, that is what it *said* that it'd do. Never got any mail, though.neat. very small. so does this mean you got derelict to work on the mac? :)Not really, I didn't feel like hunting through the BAT and BRF files... Can't see why it wouldn't work, though ? DL works. GL works. SDL works. --anders
May 30 2005
clayasaurus wrote:Humm... I think what's supposed to happen is if you try to login with an existing username, it sends you an email with a new password. Anyway, I put a topic on the derelict forums for you :)Looks like it batched the emails, I got three of them - six hours later. --anders
May 30 2005