A Day with Rotor on MAC OS/X
Recently, I did a similar stint to my
dive into Rotor on Windows a year ago this time on
my Mac and OS X. Here is a collection of my findings and postings of the steps that I took in order that they might help someone. First, you will need to make sure that you have installed the Apple Developer Tools which are freely available on the
Apple ADC site. Then download the
Rotor Shared Source CLI Distribution. Here was my first attempt to build after I downloaded and let Stuffit expand the zip file. Rotor is supposed to build on OS X 10.2 but I didn't get too far. I only got into the PAL, in fact, trying to build nmake itself and got the following. Any Rotor gurus out there have any ideas?
Last login: Sun Aug 17 02:40:20 on console
Welcome to Darwin!
[iMac-5:~] sam% cd /sscli/
[iMac-5:/sscli] sam% ls
build configure.in license.txt pal
buildall docs license_banner_for_sources.txt palrt
buildall.cmd env.bat licensed_file_list.txt readfirst.html
builddf.log env.csh makefile rotorenv
clr env.sh makefile.common samples
config.log fx makefile.common.in tests
config.status install-sh makefile.in tools
configure jscript managedlibraries
[iMac-5:/sscli] sam% source env.csh
Fastchecked Environment
[iMac-5:/sscli] sam% ./buildall
Building the PAL...
Building nmake tool...
*** Error while building /sscli/tools/nmake
Open /sscli/tools/nmake/builddf.log to see the error log.
[iMac-5:/sscli] sam% cat /sscli/tools/nmake/builddf.log
ld -o /sscli/build/v1.ppcfstchk.rotor/nmake -L/sscli/build/v1.ppcfstchk.rotor -dynamic /usr/lib/crt1.o -lrotor_pal action.o build.o charmap.o command.o error.o exec.o file.o getrcmsg.o globals.o ifexpr.o init.o inline.o lexer.o macro.o nmake.o parser.o print.o rpn.o rule.o util.o utilp.o win32.o /usr/lib/libcc_dynamic.a
ld: Undefined symbols:
___gxx_personality_v0
make: *** [/sscli/build/v1.ppcfstchk.rotor/nmake] Error 1
[iMac-5:/sscli] sam%
Then,
Problem solved thanks to Adam Vandenberg. I needed to get and install the Dec 2002 Apple GCC update. It's now building! I'll write up the steps as a story sometime today.
This enabled me to build Rotor successfuly and start compiling C# programs.
59 files binplaced
[iMac-5:/sscli] sam% rehash
[iMac-5:/sscli] sam% csc
Microsoft (R) Visual C# Shared Source CLI Compiler version 1.0.0003
for Microsoft (R) Shared Source CLI version 1.0.0
Copyright (C) Microsoft Corporation 2002. All rights reserved.
Then there is the program:
public class HelloMac
{
private static string _helloMessage = "Hello Managed Mac!";
public static void Main()
{
System.Console.WriteLine(_helloMessage);
}
}
[iMac-5:/sscli] sam% xemacs HelloMac.cs &
[1] 9784
[iMac-5:/sscli] sam% csc -t:exe -debug HelloMac.cs
Microsoft (R) Visual C# Shared Source CLI Compiler version 1.0.0003
for Microsoft (R) Shared Source CLI version 1.0.0
Copyright (C) Microsoft Corporation 2002. All rights reserved.
/sscli/HelloMac.cs(7,34): error CS0120: An object reference is required for the nonstatic field, method, or property 'HelloMac._helloMessage'
[iMac-5:/sscli] sam% csc -t:exe -debug HelloMac.cs
Microsoft (R) Visual C# Shared Source CLI Compiler version 1.0.0003
for Microsoft (R) Shared Source CLI version 1.0.0
Copyright (C) Microsoft Corporation 2002. All rights reserved.
[iMac-5:/sscli] sam% clix HelloMac.exe
Hello Managed Mac!
-->