I'm currently trying to port my engine to MacOSX (Snow Leopard).
The problem is, while everything compiles ok, there are bugs everywhere, everything crashes even in places it shouldnt!
Even during program startup, just calling SetLength twice on the same array (for redimensioning it) causes a crash.
Also using {$APPTYPE GUI} does not work, my program still brings up a console when run.

I can't post the code, because it is huge (about one hundred .pas files).
I've ported the engine successfully in the past to nintendo DS, and Linux, with no problems of this kind.

I'm using $mode DELPHI for everything, if this makes any difference.
And I'm running it from the command line (I was using -XX and -O2, but now tried even without those, and it has the same problem)
I could try Lazarus, however my program does not use a GUI (well, it usually creates a openGL window, but even now I'm just compilling the hello world, that just uses a logger class and nothing else)

Is there something different to take care when compiling for mac?
Or is the compiler not compatible with snow leopard?
Or is this some know bug?

Help