That's a pretty low level error, like with the C runtime. What are you
trying to build?
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- Do not use for personal hygiene. -- Actual label, toilet brush -------------
It looks like you told CodeWarrior to build an application, but you
aren't linking against the runtime library which defines __start() in
terms of main().
Josh
> I was just test driving a console app. Basic "Hello World"; just to
> see if it compiles.
You might enjoy MacRelix. It's an open source POSIX-like environment
for classic Mac OS -- perfect for stdio programs. You get a number of
POSIX calls instead of just the standard C library. As long as your
process is making system calls you don't have to worry about locking
up the UI, so you can make blocking read() calls (for example). Also,
an illegal instruction or invalid memory access delivers a fatal
signal to just the offending thread[1] instead of crashing the whole
application.
MacRelix
http://www.metamage.com/code/MacRelix/
Also, you can write GUI apps in it (to an extent) by targeting the /
gui filesystem[2]:
FORGE: A File-Oriented Reflective Graphical Environment
http://www.metamage.com/code/forge/
MacRelix user programs are built as shared libraries on PPC and code
resources as 68K.
> This is the first time I'm using C on Mac and I'm
> not certain I'm getting it right.
I suspect you're missing "MSL RuntimePPC.Lib". You'll also need "MSL
C.PPC.Lib", or "MSL C.Carbon.Lib" for Carbon. And of course
InterfaceLib or CarbonLib.
Josh
[1] When possible. Some memory accesses are system-fatal.
[2] Hello World is four lines of shell script.
Speaking honestly here: any chance of making this a runtime? I like the
concept, but users might find having to deal with MacRelix directly to be
opaque. (No offense :)
Also, I forget if networking is available in MacRelix.
--
------------------------------------ personal: http://www.cameronkaiser.com/ --
Cameron Kaiser * Floodgap Systems * www.floodgap.com * cka...@floodgap.com
-- There are 10 kinds of people: those who read binary, and those who don't. --
>> Also, you can write GUI apps in it (to an extent) by targeting the /
>> gui filesystem[2]:
>>
>> FORGE: A File-Oriented Reflective Graphical Environment
>> http://www.metamage.com/code/forge/
>
> Speaking honestly here: any chance of making this a runtime? I like
> the
> concept, but users might find having to deal with MacRelix directly
> to be
> opaque. (No offense :)
Yes, I've thought about that. You'll need a way to pack resources
into the MacRelix application file and make them accessible through
the file system. I could have a user binary's code fragment appended
to the data fork[1] and listed in 'cfrg' 0, storing the absolute
pathname as the fragment name. Similarly, executable scripts and
other text files could be 'TEXT' resources (in MacRoman with CR
newlines, to be converted to UTF-8 / LF newlines automatically), with
the absolute path as the resource name. Each case limits the length
of the pathname, but it should be sufficient.
Another step that will be highly desirable for a MacRelix runtime (and
also for normal use when RAM is severely limited) is selective
inclusion of kernel features. You should be able to omit unneeded
filesystems and system calls, for example.
> Also, I forget if networking is available in MacRelix.
Yes. MacRelix provides a minimal implementation of TCP client and
server sockets via Open Transport, and ships with sample htget and
httpd, among others. It also works with git-fetch and git-daemon
(included).
Josh
[1] 68K code resources would be just be added as is, but with
appropriate names and arbitrary IDs.