Welcome to MacBoardz.com!
FAQFAQ    SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Help needed switching from CW 9 to XCode

 
   Macintosh computer (Home) -> Programmer Code RSS
Next:  Encoding Conversion from CVS philosophy  
Author Message
RogueWarrior

External


Since: Apr 07, 2006
Posts: 39



(Msg. 1) Posted: Sat Jul 01, 2006 3:29 pm
Post subject: Help needed switching from CW 9 to XCode
Archived from groups: comp>sys>mac>programmer>codewarrior (more info?)

I'd appreciate a little remedial help on this. I've been trying to
prep a Codewarrior 9 project for conversion to XCode and I've run into
all manner of nasty compile errors. Stuff that doesn't make any sense.
Perhaps I'm reading too much into the published preparation
procedures.

The Apple Developer procedures tell you to:
"Remove any MSL libraries (such as MSL_All_CarbonD.Lib) from the
Libraries folder in the Files tab of your project.
Remove any access paths to MSL libraries from the Access Paths pane of
the Target Settings window for the target.
Add paths to the Access Paths pane for {OS X Volume}usr/include and {OS
X Volume}usr/lib.
Add the file /usr/lib/libSystem.dylib to your project. This is a
symlink that will resolve to the appropriate version of the system
library.
You may need to add the file crt1.o (located in /usr/lib) to the
project and make it the first file in the Link Order settings tab."

and then

"Make your own prefix file and precompile it. As mentioned in a
previous section, some projects can use just the statement #include
<Carbon/Carbon.h> in your prefix file. Of course you may need to
construct a more complex prefix file.
In the C/C++ Language pane of the Target Settings window, enter the
name of your file in the Prefix File text field.

Or you can modify the source for the CodeWarrior precompiled header so
that it precompiles against the headers in /usr/lib, rather than the
MSL headers, then re-precompile it."

Here's my interpretation:
I take all of this to mean that there are absolutely no access paths
with "MSL" in them. When I do this I get the following nasty errors.

"Error : the file 'mw_stdarg.h' cannot be opened
(included from:
CoreFoundation/CoreFoundation.h:12
CarbonCore/CarbonCore.h:20
CoreServices/CoreServices.h:21
Carbon/Carbon.h:20
QuickTime/QuickTime.h:20
Movies.h:1
PluginGlueMac-MachO.c:1Cool
stdarg.h line 6 #include "mw_stdarg.h"

Error : undefined identifier 'LangCode'
(included from:
CoreFoundation/CFString.h:13
CoreFoundation/CFPropertyList.h:10
CoreFoundation/CoreFoundation.h:46
CarbonCore/CarbonCore.h:20
CoreServices/CoreServices.h:21
Carbon/Carbon.h:20
QuickTime/QuickTime.h:20
Movies.h:1
PluginGlueMac-MachO.c:1Cool
CFLocale.h line 75
ocaleIdentifierFromScriptManagerCodes(CFAllocatorRef allocator,
LangCode lcode, RegionCode rcode) AVAILABLE_MAC_OS_X_VERSION_10
"
Adding in an access path to "MacOS X Support" fixes that but I then get
all sorts of errors such as "undefined identifier 'NULL'" Wha huh???

Adding in an access path to FlatCarbon appears to solve those but then
I get all sorts of wonky errors such as:
Error : the file 'MacTypes.h' cannot be opened
(included from:
CoreFoundation/CoreFoundation.h:38
CarbonCore/CarbonCore.h:20
CoreServices/CoreServices.h:21
Carbon/Carbon.h:20
(C-C++ Preprocessor Panel):1
PluginGlueMac-MachO.c:1)
CFBase.h line 34 #include <MacTypes.h>

Error : undefined identifier 'LangCode'
(included from:
CoreFoundation/CFString.h:13
CoreFoundation/CFPropertyList.h:10
CoreFoundation/CoreFoundation.h:46
CarbonCore/CarbonCore.h:20
CoreServices/CoreServices.h:21
Carbon/Carbon.h:20
(C-C++ Preprocessor Panel):1
PluginGlueMac-MachO.c:1)
CFLocale.h line 75
ocaleIdentifierFromScriptManagerCodes(CFAllocatorRef allocator,
LangCode lcode, RegionCode rcode) AVAILABLE_MAC_OS_X_VERSION_10

Error : identifier 'LangCode' redeclared
was declared as: 'int'
now declared as: 'short'
(included from:
CarbonCore/CarbonCore.h:29
CoreServices/CoreServices.h:21
Carbon/Carbon.h:20
(C-C++ Preprocessor Panel):1
PluginGlueMac-MachO.c:1)
MacTypes.h line 271 typedef SInt16 LangCode;


Now I've tried this on a Codewarrior 9 Mach-O template project and I
get these errors. What on earth am I doing wrong.

 >> Stay informed about: Help needed switching from CW 9 to XCode 
Back to top
Login to vote
RogueWarrior

External


Since: Apr 07, 2006
Posts: 39



(Msg. 2) Posted: Sat Jul 01, 2006 4:58 pm
Post subject: Re: Help needed switching from CW 9 to XCode [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Nevermind. The magic incantation for anyone interested is

#define __CF_USE_FRAMEWORK_INCLUDES__

In the preprocessor settings.

Why on earth Apple and every XCode book fails to mention this is beyond
me.

 >> Stay informed about: Help needed switching from CW 9 to XCode 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Switching off warnings messages - Hi, Is there a way to switch off a specific warning ???. The one I want to switch off is "macro 'XXXXXX' redefined. I can switch them of in VC. Although I am doing MacOS development. Any ideas Thanks Mark.

alt-tab - source to header switching? - how does one switch between source file (.cpp) and header file (.h) within OS X. I've been working with Codewarrior v7 on a OS 9 machine and apple-tab would toggle between source and header. now I just moved my CW v.7 environment to an OS X machine and...

class/template help needed - I'm working on some code that started life in VC 6. I'm having trouble with the following (grossly simplified) construct: template <class TYPE> class foo { ... }; template <class VARTYPE, class METRICTYPE> class bar : public foo<bar&...

Help needed: SPBOpenDevice and carbon - Hi I try it again. I have an app that works fine in CW7 and that I want to port to carbon in a PowerPlant app with CW 8.3. (MacOS 9.2.2). There is a difficulty with SPOpenDevice. Debugging thru the code opens the driver correctly, but only the first time...

Mac developer needed (URGENT) - Hi guys! I'm looking for a Mac developer to work as freelance with one of the world's leader in 3D applications located in Montreal, Canada. The candidate will be called upon porting software new features on the machintosh platform. This project als...
   Macintosh computer (Home) -> Programmer Code All times are: Pacific Time (US & Canada)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]