Mac68k Forums

Home


Welcome, Guest
Guest Settings
Help

Mac68k Forums » Help » Software Help

Thread: Using Think C 5.0


Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 7 - Pages: 1 - Last Post: Sep 24, 2015 1:07 AM Last Post By: integerpoet
bigmessowires


Posts: 217
Registered: 10/29/13
Using Think C 5.0
Posted: Feb 25, 2015 10:09 PM
Click to report abuse...   Click to reply to this thread Reply
I've installed Think C 5.0, in the hopes that it will be easier than Codewarrior 6 to make software that works on super ancient Macs. I remember using TC5 like 25 years ago, but I've forgotten... everything.

First dumb question - how do you add resources to a project? The "Add sources" menu item only seems to work for .c files and libraries. A quick check of the demo projects looks like they all create resources programmatically, and don't use resource files.
bigmessowires


Posts: 217
Registered: 10/29/13
Re: Using Think C 5.0
Posted: Feb 25, 2015 10:23 PM   in response to: bigmessowires in response to: bigmessowires
Click to report abuse...   Click to reply to this thread Reply
I found the answer right here, from a post bbraun made three years ago:

bbraun wrote:
However, for applications, THINK C is pretty easy. Although I'm still trying to figure out how to effectively use THINK C with Resedit created resources. It wants to compile resources from the Rez specification language rather than merge
in pre-compiled resources generated with something like Resedit. Additionally, when compiling an application, THINK will overwrite the target rather than merge in the compiled resources. So after every build, you'll need to copy & paste in
your precompiled resources by hand.

So that works. But wow, what a pain in the butt!
bbraun


Posts: 493
Registered: 7/25/12
Re: Using Think C 5.0
Posted: Feb 26, 2015 11:30 AM   in response to: bigmessowires in response to: bigmessowires
Click to report abuse...   Click to reply to this thread Reply
Yeah, kind of a hassle. I've been meaning to get to Rez anyway since that's what MPW likes to use too, but it seems like for some resource types like DITL and some of the window and dialog box things, it'd be easier to use ResEdit and have the resources merged in. I have a feeling if I used THINK very much, I'd have a separate program or applescript or something to merge resources after compilation.
integerpoet

Posts: 12
Registered: 9/12/15
Re: Using Think C 5.0
Posted: Sep 13, 2015 3:20 AM   in response to: bigmessowires in response to: bigmessowires
Click to report abuse...   Click to reply to this thread Reply
To merge a resource file into your app during build…

If your project is named "Foo.π", then name a peer of the project "Foo.π.rsrc".

Come on! It's blatantly obvious! :-)

bbraun


Posts: 493
Registered: 7/25/12
Re: Using Think C 5.0
Posted: Sep 13, 2015 10:38 AM   in response to: integerpoet in response to: integerpoet
Click to report abuse...   Click to reply to this thread Reply
That's super helpful to know. Thanks!
integerpoet

Posts: 12
Registered: 9/12/15
Re: Using Think C 5.0
Posted: Sep 13, 2015 2:55 PM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Another thing that just came back to me is how relieved I was to finally have an IDE that treated resource files as first-class citizens (alongside, say, C files). I don't remember if that was a later iteration of THINK C or if it was CodeWarrior. Probably both did it eventually, but obviously I saw one or the other first.
bbraun


Posts: 493
Registered: 7/25/12
Re: Using Think C 5.0
Posted: Sep 13, 2015 9:04 PM   in response to: integerpoet in response to: integerpoet
Click to report abuse...   Click to reply to this thread Reply
Codewarrior for sure, but post THINK C 5, it became Symantec C++ I think and they probably improved the treatment of resource files, although I haven't used it much.
integerpoet

Posts: 12
Registered: 9/12/15
Re: Using Think C 5.0
Posted: Sep 24, 2015 1:07 AM   in response to: bbraun in response to: bbraun
Click to report abuse...   Click to reply to this thread Reply
Just as a heads-up, I have found that the debugger behaves poorly under Mac OS 8.1. Under 7.5.5 it seems OK.

What do you do about the fact that the 64K ROM lacks MaxApplZone? There's supposed to be glue that not only checks for whether the trap is implemented but also does the right thing if it isn't.

Point your RSS reader here for a feed of the latest messages in all forums