#CodeWarrior problem
2 messages in this thread
>>It looks to me like you are trying to use large code model in a code
resource. 32-bit relocations are not supported in code resources, so you need
to use small model. Let me know if that's not the problem.
I apologize for the fact that the environment allows you to choose an invalid
option and then issues such a baroque error message. I'll suggest that we clean
that up in a future release.<<
Ah, I found the code model stuff in the preferences dialog and it was set to
"Smart" (I think it needs an education ;-)). I changed it to "Small" and
rebuilt. I still had one message:
~~ Link Error : LinkError:CString.cpp: '__vt__String' has illegal single
segment 32-bit reference to 'String::~String(String *const, short)'.
This is really odd. I use the String class (home grown one) all over the place
and the only thing it chokes on is the destructor. Also, why does the
destructor take a short? Just asking. Anyhow, I did as Doug Wyatt suggested
and checked Link Multi-Segment and it built. Now if I could just get HyperCard
to recognize it. It says "I don't understand "xxx". I don't think that's your
problem tho.
Also, I notice that my main() is not the first thing in the code resource.
There's a bunch of stuff that gets some resource and loads it (I presume the
XCMx). Shouldn't main be at the top or do you add in some code to load some
resources for debugging or something?
Thanks,
Todd Blanchard
Todd,
The destructor takes a short because there is a hidden argument telling it
whether it needs to free the object or not.
The stuff at the start of the resource is the runtime support for multi-segment
resources. main() doesn't have to be at the start, as long as the code that is
at the start correctly does its thing and transfers control to main().
Dan Podwall
Metrowerks, Inc.