D.gnu - carbon sample
- Carlos Santander (23/23) May 23 2005 I'm using Anders' HelloDWorld sample. First, I'm using gdc-0.11 with
- David Friedman (6/31) May 23 2005 Window behind the terminal is normal when running from the terminal.
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (18/31) May 24 2005 It should be easier with next reincarnation of GDC-Mac,
- Carlos Santander (7/30) May 25 2005 Thanks. I downloaded the pdf. It says it's for Tiger but I have Panther....
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (13/17) May 26 2005 Apple always pushes the latest version on their site,
- Carlos Santander (4/24) May 26 2005 Thanks for the help. To David as well.
- Carlos Santander (6/11) May 26 2005 One more: say I wanted to port one of the existing GUI libraries to Mac....
- Sha Chancellor (10/21) May 27 2005 It is possible to create GUI applications without Xcode and Interface Bu...
- Carlos Santander (6/19) May 27 2005 I'm not saying I'll do it. I just asking now, but I don't have the most
- Carlos Santander (6/14) May 25 2005 There's a Info.plist. I don't know if it's correct or not. Xcode created...
- David Friedman (3/20) May 25 2005 Correct, Xcode creates the .app bundle and should be copying all the
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (8/15) Jun 14 2005 Side Note:
- =?ISO-8859-1?Q?Anders_F_Bj=F6rklund?= (6/7) May 26 2005 There is no support "out-of-the-box" to build .apps,
I'm using Anders' HelloDWorld sample. First, I'm using gdc-0.11 with gcc-3.4.3 on Mac OS X 10.3.9. I don't want to screw up any of the default things that come with the system, so I installed in /usr/local. As a result of this, I can't link with that gcc because I get: /usr/bin/ld: Undefined symbols: _CreateNibReference _CreateWindowFromNib _DisposeNibReference _RunApplicationEventLoop _SetMenuBarFromNib _ShowWindow ___CFStringMakeConstantString So I'm compiling with that gcc (gdc -c main.d) but linking with the other (system's default) gcc (/usr/bin/gcc -o main main.o /usr/local/lib/libphobos.a -Wl -framework Carbon). That links correctly and the program runs. I see a window with a message there. The first problem is that the window is created behind my terminal. That just doesn't seem normal. But the worst is that I can't select it. I click on it and nothing happens. I mean, it doesn't get the focus. All I can do is close it. Is that how it's working ATM? Any ideas on how to make any progress? -- Carlos Santander Bernal
May 23 2005
Carlos Santander wrote:I'm using Anders' HelloDWorld sample. First, I'm using gdc-0.11 with gcc-3.4.3 on Mac OS X 10.3.9. I don't want to screw up any of the default things that come with the system, so I installed in /usr/local. As a result of this, I can't link with that gcc because I get: /usr/bin/ld: Undefined symbols: _CreateNibReference _CreateWindowFromNib _DisposeNibReference _RunApplicationEventLoop _SetMenuBarFromNib _ShowWindow ___CFStringMakeConstantString So I'm compiling with that gcc (gdc -c main.d) but linking with the other (system's default) gcc (/usr/bin/gcc -o main main.o /usr/local/lib/libphobos.a -Wl -framework Carbon). That links correctly and the program runs. I see a window with a message there. The first problem is that the window is created behind my terminal. That just doesn't seem normal. But the worst is that I can't select it. I click on it and nothing happens. I mean, it doesn't get the focus. All I can do is close it. Is that how it's working ATM? Any ideas on how to make any progress?Window behind the terminal is normal when running from the terminal. Try the command "open HellowDWorld.app" instead. Are you sure the ".app" bundle is built correctly? A missing Info.plist file causes that kind of problem. David
May 23 2005
Carlos Santander wrote:I'm using Anders' HelloDWorld sample. First, I'm using gdc-0.11 with gcc-3.4.3 on Mac OS X 10.3.9. I don't want to screw up any of the default things that come with the system, so I installed in /usr/local.It should be easier with next reincarnation of GDC-Mac, I will build that with GCC 3.3.6 and install in /usr... I'll build a standalone 3.4 version for /opt/gdc, as well. Just in case you want to use the vanilla version instead ?So I'm compiling with that gcc (gdc -c main.d) but linking with the other (system's default) gcc (/usr/bin/gcc -o main main.o /usr/local/lib/libphobos.a -Wl -framework Carbon). That links correctly and the program runs. I see a window with a message there. The first problem is that the window is created behind my terminal. That just doesn't seem normal. But the worst is that I can't select it. I click on it and nothing happens. I mean, it doesn't get the focus. All I can do is close it. Is that how it's working ATM? Any ideas on how to make any progress?This is "normal". :-P (nothing to with D, more with Mac) You need to have all the other XML and bundle directory stuff organized, to get a "real" Mac OS X application. http://developer.apple.com/documentation/MacOSX/Conceptual/OSX_Technology_Overview/ Using the Xcode project helps setting all that cruft up ? Without it, I normally only do text-only Terminal apps.... Although, you can still use SDL or GLUT to take care of that stuff for you - without messing with an .app bundle. With "Carbon", I'm afraid it's required. (I recommend Xcode) Besides, you *want* to be using it and Interface Builder ? :-) SDL / OpenGL are available from http://www.algonet.se/~afb/d/ (import modules for D, I mean - libraries at the usual places) --anders
May 24 2005
Anders F Björklund escribió:This is "normal". :-P (nothing to with D, more with Mac) You need to have all the other XML and bundle directory stuff organized, to get a "real" Mac OS X application. http://developer.apple.com/documentation/MacOSX/Conceptual/OSX_ echnology_Overview/Thanks. I downloaded the pdf. It says it's for Tiger but I have Panther. Does it also apply?Using the Xcode project helps setting all that cruft up ? Without it, I normally only do text-only Terminal apps....I didn't work at first, that's why I tried with command line. I tried again and it worked. Thanks.Although, you can still use SDL or GLUT to take care of that stuff for you - without messing with an .app bundle. With "Carbon", I'm afraid it's required. (I recommend Xcode) Besides, you *want* to be using it and Interface Builder ? :-) SDL / OpenGL are available from http://www.algonet.se/~afb/d/ (import modules for D, I mean - libraries at the usual places) --anders-- Carlos Santander Bernal
May 25 2005
Carlos Santander wrote:Apple always pushes the latest version on their site, and removes the older ("obsolete") ones from the front. But it's still available for download, or on the CD too (The Xcode Tools CD, which should have come with the OS) Panther and Tiger are rather similar, so it should work. (there were some horrible bugs in 10.0, and Jaguar fixed some shortcomings in the earlier versions like 10.1/Puma) I think Panther is a good mainstream target, for the time being. (Xcode has SDK support for compiling programs *for* 10.1 - 10.3, but I think you need Xcode 2.0 to be able to compile for 10.4 ?) But most Panther applications should run as-is on Tiger as well. --andershttp://developer.apple.com/documentation/MacOSX/Conceptual/OSX_ echnology_Overview/Thanks. I downloaded the pdf. It says it's for Tiger but I have Panther. Does it also apply?
May 26 2005
Anders F Björklund escribió:Apple always pushes the latest version on their site, and removes the older ("obsolete") ones from the front. But it's still available for download, or on the CD too (The Xcode Tools CD, which should have come with the OS) Panther and Tiger are rather similar, so it should work. (there were some horrible bugs in 10.0, and Jaguar fixed some shortcomings in the earlier versions like 10.1/Puma) I think Panther is a good mainstream target, for the time being. (Xcode has SDK support for compiling programs *for* 10.1 - 10.3, but I think you need Xcode 2.0 to be able to compile for 10.4 ?) But most Panther applications should run as-is on Tiger as well. --andersThanks for the help. To David as well. -- Carlos Santander Bernal
May 26 2005
Anders F Björklund escribió:Using the Xcode project helps setting all that cruft up ? Without it, I normally only do text-only Terminal apps.... --andersOne more: say I wanted to port one of the existing GUI libraries to Mac. MinWin, for example. If Xcode is the only way to build GUI applications, how could it be done? -- Carlos Santander Bernal
May 26 2005
It is possible to create GUI applications without Xcode and Interface Builder. Interface Builder generates nib files which can be loaded at runtime with the Carbon Nib API. The controls it creates can then be referenced by a 4 byte code. Normally you can create them by hand with CreateNewControl and the like. This would be the way to port MinWin over. I would love to help with a port of MinWin btw. -Sha In article <d75g7n$6hu$1 digitaldaemon.com>, Carlos Santander says...Anders F Björklund escribió:Using the Xcode project helps setting all that cruft up ? Without it, I normally only do text-only Terminal apps.... --andersOne more: say I wanted to port one of the existing GUI libraries to Mac. MinWin, for example. If Xcode is the only way to build GUI applications, how could it be done? -- Carlos Santander Bernal
May 27 2005
Sha Chancellor escribió:It is possible to create GUI applications without Xcode and Interface Builder. Interface Builder generates nib files which can be loaded at runtime with the Carbon Nib API. The controls it creates can then be referenced by a 4 byte code. Normally you can create them by hand with CreateNewControl and the like. This would be the way to port MinWin over. I would love to help with a port of MinWin btw. -ShaI'm not saying I'll do it. I just asking now, but I don't have the most important resource for doing it (in other words, time). If you started it, I could test. -- Carlos Santander Bernal
May 27 2005
David Friedman escribió:Window behind the terminal is normal when running from the terminal. Try the command "open HellowDWorld.app" instead. Are you sure the ".app" bundle is built correctly? A missing Info.plist file causes that kind of problem. DavidThere's a Info.plist. I don't know if it's correct or not. Xcode created a .app. Kinda OT: gcc can't create .app, right? -- Carlos Santander Bernal
May 25 2005
Carlos Santander wrote:David Friedman escribió:Correct, Xcode creates the .app bundle and should be copying all the necessary files.Window behind the terminal is normal when running from the terminal. Try the command "open HellowDWorld.app" instead. Are you sure the ".app" bundle is built correctly? A missing Info.plist file causes that kind of problem. DavidThere's a Info.plist. I don't know if it's correct or not. Xcode created a .app. Kinda OT: gcc can't create .app, right?
May 25 2005
David Friedman wrote:Side Note: WxWidgets uses GCC (if you tell it) to build the .apps, you can look at the generated Makefiles for that project ? http://www.wxwidgets.org/ However, the library itself is in C++ (and Objective-C++) so I don't think it (wxWidgets) is very usable from D code... --andersThere's a Info.plist. I don't know if it's correct or not. Xcode created a .app. Kinda OT: gcc can't create .app, right?Correct, Xcode creates the .app bundle and should be copying all the necessary files.
Jun 14 2005
Carlos Santander wrote:Kinda OT: gcc can't create .app, right?There is no support "out-of-the-box" to build .apps, but you could do it with "mkdir" and "cp" since the .app is just a certain directory file structure... The trick is getting all the names, and the XML, right. ;-) --anders
May 26 2005