Jump to page: 1 2
Thread overview
carbon sample
May 23, 2005
Carlos Santander
May 24, 2005
David Friedman
May 25, 2005
Carlos Santander
May 26, 2005
Carlos Santander
May 26, 2005
Carlos Santander
May 27, 2005
Sha Chancellor
May 27, 2005
Carlos Santander
May 25, 2005
Carlos Santander
May 25, 2005
David Friedman
May 23, 2005
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 24, 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 24, 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 25, 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_Technology_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
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.
> 
> David

There'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ó:
> 
>>
>> 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
> 
> 
> There'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.

May 26, 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
Carlos Santander wrote:

>> http://developer.apple.com/documentation/MacOSX/Conceptual/OSX_Technology_Overview/ 
> 
> Thanks. I downloaded the pdf. It says it's for Tiger but I have Panther. Does it also apply?

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.

--anders
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....
> 
> --anders

One 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
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.
> 
> --anders

Thanks for the help. To David as well.

-- 
Carlos Santander Bernal
« First   ‹ Prev
1 2