Re: porting old app to OS X
Re: porting old app to OS X
- Subject: Re: porting old app to OS X
- From: Ian Anderson <email@hidden>
- Date: Tue, 15 Nov 2005 10:24:10 -0800
Try email@hidden
Hi,
We have a c program which is about 10 yrs old and I am trying to
see if I
can compile it under OS X.
After creating a new project (using Eclipse CDT by the way) I had many
undefined types due to missing header files. I managed to fix many
of them
by including the path "/Developer/Headers/FlatCarbon". However,
still a
whole bunch of them remained undefined. These included types like
"ControlHandle" and "WindowPtr".
We did some searching and found out that "ControlHandle" for
example is
supposed to be defined in "Controls.h". So I looked under
"/Developer/Headers/FlatCarbon" and found "Controls.h". This file
has only
one line which is an include "#include <Carbon/Carbon.h>". I looked
under
"Carbon.h" and I realized that it looks exactly the same, has only
one line
which is the same include.
It seems that the "Controls.h" file has been changed over time. We
also
found another versions of "Controls.h" which seems to be the right
one that
this program used to use previously. We found it under
"System/Library/Frameworks/Carbon.framework/Frameworks/
HIToolbox.framework/H
eaders". This one has actually defined "ControlHandle" which is
basically a
"Typedef ControlRef". The comments mention that "ControlHandle"
has become
obsolete and we should use "ControlRef" from now on, hence the
typedef.
Now, I tried adding the path for this second version of
"Controls.h" to the
project so that it can recognize the "ControlHandle" references,
yet it
didn't work. I think the compile process is still using the 1st
version and
not the second one which actually defines it. I tried removing the
first
path but that still didn't work and I ended up with all the errors
which
were fixed by having the first path added to the project.
I find it very odd that the header files under the "FlatCarbon" dir
helped
with most type definitions but not all. Is there another Header
directory
that I need to add for the project? Any suggestion as to how I can
have the
project find and recognize these remaining types would be very
helpful.
Thanks.
Nima Bahramifarid
Greenley & Associates
1135 Innovation Dr., Suite 200
Kanata, Ontario K2K 3G7
247-0342 ex 212
<mailto:email@hidden> email@hidden
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden