Author Topic: C/C++ Compilers and Frameworks that work?  (Read 8165 times)

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
C/C++ Compilers and Frameworks that work?
« on: November 24, 2018, 03:35:55 AM »
Way Back When, I started teaching myself how to write GUI code using THINK C/Symantec C++.
Now I'd like to go back and write some code for 68k/PowerPC Macintoshes for nostalgia.
I've been experimenting with Metrowerks, but the CW 10 Gold installation killed my OS.
The Symantec C++ 8.6 that's floating around is buggy as Hell.
I actually have Symantec C++ 7.0, but it's more than a little limited.
Do I have to break down and learn MPW?

Offline Naiw

  • Veteran Member
  • ****
  • Posts: 126
  • new to the forums
Re: C/C++ Compilers and Frameworks that work?
« Reply #1 on: November 27, 2018, 10:25:21 AM »
Not sure what OS version you're running.

But Code warrior you probably should try something more recent,
Code Warrior Pro 4 or later are good stable environments on anything post System 7.

As for MPW I think it's a pile of shit unless you desperately need to create more advanced build procedures than CodeWarrior supports via apple events and project setups.
Or if you're unable to obtain CodeWarrior- let's say there was a reason CodeWarrior was the defacto standard IDE since 1994 or something....

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
Re: C/C++ Compilers and Frameworks that work?
« Reply #2 on: November 27, 2018, 02:52:14 PM »
Right now, SheepShaver on OS 9.  I'll have to try the different versions of CW that are around.
Wish NXP could sell me the last solid release for download.

Offline Naiw

  • Veteran Member
  • ****
  • Posts: 126
  • new to the forums
Re: C/C++ Compilers and Frameworks that work?
« Reply #3 on: November 29, 2018, 02:47:39 AM »
Right now, SheepShaver on OS 9.  I'll have to try the different versions of CW that are around.
Wish NXP could sell me the last solid release for download.

The latest solid release does not run on Mac OS 9 though. The last release to run on Mac OS 9 was CodeWarrior Pro 7 I think (possibly Pro 8), the later Pro 9 and Pro 10 (the last release) definately only run on Mac OS X.

You may be able to find them at macintoshgarden I believe, if you're lucky you'll find a license file as well- otherwise it will run in evaluation mode and have some restrictions.

Offline Knezzen

  • Administrator
  • Platinum Member
  • *****
  • Posts: 987
  • Pro Tools Addict!
    • Macintosh Garden
Re: C/C++ Compilers and Frameworks that work?
« Reply #4 on: November 29, 2018, 03:14:26 AM »
CodeWarrior 8 is the last version and it can be found on Macintosh Garden :)

http://macintoshgarden.org/apps/codewarrior-pro-8x
Pro Tools addict and admin at Macintosh Garden, Mac OS 9 Lives! and System 7 Today

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
Re: C/C++ Compilers and Frameworks that work?
« Reply #5 on: November 29, 2018, 05:32:28 AM »
Great, thanks for the info!  I'll try CW8.  I got pulled away from my Mac development path in 1995, so there's a twenty year gap of knowledge.

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
Re: C/C++ Compilers and Frameworks that work?
« Reply #6 on: November 29, 2018, 08:21:38 AM »
Kind of stuck trying to run CW8.  I'm using SheepShaver with Mac OS 9.0.4.  CW says it needs 9.1 to run.  I tried downloading the 9.2.2 Universal CD from Macintosh Garden but it says that it can't run on my system.

Offline Knezzen

  • Administrator
  • Platinum Member
  • *****
  • Posts: 987
  • Pro Tools Addict!
    • Macintosh Garden
Re: C/C++ Compilers and Frameworks that work?
« Reply #7 on: November 29, 2018, 09:43:23 AM »
If you only have SheepShaver and have no real Mac, you are stuck with 9.0.4 I'm afraid.

I know that CodeWarrior Pro 6 works in Mac OS 8.6 and newer, so give that a show.
No idea about the system requirements for CodeWarrior Pro 7. Download and try it out.

http://macintoshgarden.org/apps/codewarrior-6
http://macintoshgarden.org/apps/codewarrior-pro-71
Pro Tools addict and admin at Macintosh Garden, Mac OS 9 Lives! and System 7 Today

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
Re: C/C++ Compilers and Frameworks that work?
« Reply #8 on: November 30, 2018, 10:02:19 AM »
Downloaded the 7.1 tools disc.  I was able to unzip it, but the Toast mounter said it was an invalid filesystem.
I'm currently traveling in a country where my Internet access comes and goes.
I'll have to try CW6 when I get back to the US tomorrow.

Offline Velek

  • Active Member
  • *
  • Posts: 6
  • Professional bit twiddler
Re: C/C++ Compilers and Frameworks that work?
« Reply #9 on: December 03, 2018, 10:39:35 AM »
I keep having trouble with CodeWarrior in that it destabilizes SheepShaver.  I'm trying to get CW6 to work now.
It will often cause SheepShaver to just quit.

Offline Naiw

  • Veteran Member
  • ****
  • Posts: 126
  • new to the forums
Re: C/C++ Compilers and Frameworks that work?
« Reply #10 on: December 09, 2018, 04:24:46 PM »
Sheepshaver may not necessarily be the best tool, give QEMU a try instead- it's way slower indeed but it actually runs Mac OS 9 good and even low level stuff works as expected.

Offline Philgood

  • Gold Member
  • *****
  • Posts: 411
Re: C/C++ Compilers and Frameworks that work?
« Reply #11 on: December 10, 2018, 12:25:15 AM »
I read on the blog from Cameron Kaiser that they (QEMU) made a "breakthrough" recently in emulating OS9.
What was that ?

Update:
I think I found the answer right here on the forum.
http://macos9lives.com/smforum/index.php?topic=2941.0
*G4 MDD 1.25GHz (Single 2003)* with 2x 80Gb harddrives, 1Gb RAM, Tascam US-428 and Edirol FA-101 USB/Firewire soundcards-*iMac G3 DV 400MHz* with installs from OS 8.6-OSX Tiger on different harddrives-*Powerbook G4 1.67Ghz* with new SSD ! Love it.

Offline Naiw

  • Veteran Member
  • ****
  • Posts: 126
  • new to the forums
Re: C/C++ Compilers and Frameworks that work?
« Reply #12 on: December 14, 2018, 07:55:41 PM »
I read on the blog from Cameron Kaiser that they (QEMU) made a "breakthrough" recently in emulating OS9.
What was that ?

Update:
I think I found the answer right here on the forum.
http://macos9lives.com/smforum/index.php?topic=2941.0

I don't know if they made any breakthrough recently, OS 9 been able to run on QEMU for at least a year (that I believe was enabled by the efforts of a GSoC student).
There been some talks about implementing various features to accelerate the emulation- but I'm not sure if anything happened in that area, I believe paravirtualisation is probably the best route to take.

Offline classicmacreborn7

  • Valued Member
  • **
  • Posts: 17
  • New Member
Re: C/C++ Compilers and Frameworks that work?
« Reply #13 on: January 06, 2019, 02:47:55 PM »
I keep having trouble with CodeWarrior in that it destabilizes SheepShaver.  I'm trying to get CW6 to work now.
It will often cause SheepShaver to just quit.

Hmm.. I'm not sure why.  I'm using the CW7 release from macintosh repository.  It has never crashed my SheepShaver and works really, really well (I'm using 9.0.4 from the install cd).

Do I have to break down and learn MPW?

There's not really much to "learn" in MPW lol.  It's a really simple IDE, basically not much more than a code editor and compiler.  The shell is awesome too.  If you already know C++ and/or PASCAL it is basically self-explanatory.  The only 5 minute stumble I came across was executing commands in the shell when I first looked at it.  The shell is basically a text editor.  However, if you want to run a command, you select the command's text and use Fn-Return (to use the 'Enter' key) to execute it.

My only caveat with it is that it has this great shell that you can't use in any of your applications.  You have to write really complicated Apple Events from scratch when you could in theory just pass a one line command to ToolServer.  But ToolServer can't act as a library.  I have spent a ridiculous amount of time trying to find out if you can with no luck lol (if anyone knows a trick for this please save me).  But of course, Codewarrior doesn't even have a shell, although you can use the MPW shell from within CW.

Also, although the language is the same, the way Apple used the C-language in its interfaces back in those days is quite weird lol.  It's still the most supported language to use for a low level application- especially one that uses the Mac OS Toolbox.  Pascal was pretty dominant at first but most of the later documentation I've seen is all in C.  Apparently, Apple started using C quite a bit more in later years of Classic Mac.

If you just need to build something simple, it's WAY easier to use REALBasic though.
« Last Edit: January 06, 2019, 03:03:21 PM by classicmacreborn7 »

Offline Daniel

  • Gold Member
  • *****
  • Posts: 300
  • Programmer, Hacker, Thinker
Re: C/C++ Compilers and Frameworks that work?
« Reply #14 on: January 06, 2019, 03:18:32 PM »
(if anyone knows a trick for this please save me).

I suppose you could write something in one of MPW's startup scripts and then launch it with a simple Process Manager call. Maybe have the startup script go into a loop that looks for a certain file, runs the file, saves the results elsewhere, deletes the file, and repeats. File-based Read-Eval-Print-Loop  ;D

If you actually implement this beautifully awful idea, please share the code.

Offline classicmacreborn7

  • Valued Member
  • **
  • Posts: 17
  • New Member
Re: C/C++ Compilers and Frameworks that work?
« Reply #15 on: January 06, 2019, 06:12:56 PM »
Haha yeah could do.  I bet you could contain a binary of ToolServer in the application and like you said, spit it out as a hidden file and delete it when the app quits.  If there aren't any qualms about using the Finder (like if you have a replacement Finder) then you can just use applescript to pass strings to ToolServer with TS's DoScript event.  Finder's open event is so much simpler than LaunchApplication.