CodeWarrior 9 go boom...

kuroyume

Registered
Okay, that isn't a very informative title.

Here are the details:

I'm trying port a plugin which works on Windows (boo) to MacOS in CodeWarrior 9.0. There is a working project file for other similar plugins which I used and setup for this port. But when I try to compile the plugin, CodeWarrior crashes on a particular C++ class file (.cpp) - every time.

Since there is no real crash, just the spin wheel and 'Not Repsonding', I have no clue as to the reason. It is a massive class which has nearly 2400 lines of code (and it will grow as I uncomment sections!!!). Is CodeWarrior so fragile that it can't handle this (unlike VC++)? How do you determine the cause with something meant for industrial strength operation? I can't just disable all of it - it is an integral class to the operation of the plugin - at the basist of base levels!!! Since Metrowerks site is also 'Not Responding', I am left with little alternative but to fish and bait.

In many ways, I am starting to dislike MacOS programming. Unless the code is simplistic and small, easy. When it is complicated and large - instant lack of support.

PROVE ME WRONG!

Thank you very little,
Robert (real developer)
 
I don't know about code warrior, but if your worry is that it is built to handle such a large file, and you're on OS X, then you could try xcode or g++ on the command line.
 
What I found out is that it could not handle the number of String variables needed in two of the methods for parsing (getting and checking file lines in a while loop). There are many keywords to check (31 in one and over 40 in the other). This is only a partial set in each. It required commenting out every method in the class (a few dozen) and working until the culprits were found.

Once I put the strings directly into the 'if/else if' statements, it stopped hanging, compiled/linked cleanly, and worked. I hear rumors of this elusive 'stack' setting for the CodeWarrior project, but it seems to be unavailable for static libraries. Being an application plugin, it is no small set of little routines - it is basically an application within the application. And at 590KB nearly half completed (not including external resource files), that should give an idea.

VC++ can compile/link just about anything and it works. It is both a blessing and a blessing in disguise. And it seems to me that CodeWarrior is having difficulties (I will not be upgrading to 10) and now that they are part of FreeScale, who knows the level of support that will remain available and for how long. My concern is that I will need to be compiling CodeWarrior static libs for at least several years - until most of the application's Mac userbase has migrated to MacTel systems or the UB version on PPC.

This is going to be painful...
 
I've had similar problems but with codewarrior on OS9.

Some of my larger source code files made codewarrior hang and it wasn't a memory problem.

If your not really tied down to using codewarrior I'd suggest trying to move to Xcode which is quite good.
 
I concur - don't start disliking OSX because of CodeWarrior. Metrowerks has orphaned CodeWarrior, and most everybody I know quit using it about 18 months ago or so (myself included).

XCode is a pain in some ways, but it would have no problem with the class you described. At least as far as size goes.

'Jolly
 
Back
Top