Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help needed switching from CW 9 to XCode

4 views
Skip to first unread message

RogueWarrior

unread,
Jul 1, 2006, 6:29:38 PM7/1/06
to
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:18)
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:18)
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.

RogueWarrior

unread,
Jul 1, 2006, 7:58:22 PM7/1/06
to
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.

0 new messages