FAQFAQ   SearchSearch      ProfileProfile    Private MessagesPrivate Messages   Log in/Register/PasswordLog in/Register/Password

Help needed switching from CW 9 to XCode

 
   Mac (Home) -> Programmer Code RSS
Related Topics:
master_processor xcode 1.1 - hi, I wanna compile my code sources with xcode1.1 over Mac OS 10.3.5 [they were compiled correctly before with but this is the error i got: and it refers to a call

Power Plant to XCode - I'm sure some of you have gotten Power Plant to compile in XCode. According to Apple's developer site, it shouldn't be too I'm in knowing what you had, and also if anyone knows of a place to download the ported..

Porting a Shared Library Project to Xcode 2.0 - Hi, I am in the process of porting a Shared Library CFM project from 9.5 to Xcode 2.0. It has targets for both the Shared Library as well as the calling test app. I used the standard import from Xcode 2.0 to bring in the..

Bug in alloc.c? - I'm getting an infinite loop in alloc.c, which is located in This is with CW 9.5. The function is There is a do/while loop that searches for a block with the required size to allocate a block of..

Multiply defined symbol: .bss - Hi, when trying to build a dll for Windows using CW9 on MacOS, I get an error message like: Link Error : Multiply defined symbol: .bss in files file2.cpp The same message with the same filenames is repeated several times, but..
Next:  Programmer Code: Java awt Dialog goes back in 10.4  
Author Message
RogueWarrior

External


Since: Apr 07, 2006
Posts: 36



(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.
Back to top
Login to vote
RogueWarrior

External


Since: Apr 07, 2006
Posts: 36



(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.
Back to top
Login to vote
Display posts from previous:   
       Mac (Home) -> Programmer Code All times are: Pacific Time (US & Canada) (change)
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
Categories:
 Windows Forums
 Game Forums
 Linux Forums
  Mac Forums
 PDA Forums
 Mobile Forums
  Top  |  Store  |  RSS Feeds RSS  |  Data Feeds  |  Advertise  |  Submit  |  Bookmark  |  Newsletter  |  Contact