Yeah I'm still having trouble with compiling apps on my Mac. Lazarus doesn't seem to do everything needed to generate a properly running or distributable application/program. I currently am trying to figure out why my version of Lazarus (0.9.28.2 beta) will not compile my project using just JEDI-SDL. (no OpenGL)
I have placed the following at the top of my semi-ported Scorch2D tutorial code...
Code:
program scorch2d;
{$IFDEF Win32}
{$IFDEF FPC}
{$APPTYPE GUI} // FreePascal/Lazarus
{$ELSE}
{$APPTYPE CONSOLE} // Delphi
{$ENDIF}
{$ENDIF}
{$IFDEF DARWIN}
{$linklib SDLmain}
{$PASCALMAINNAME SDL_main} // This line gives me errors
{$linkframework Cocoa}
{$linkframework SDL}
{$ENDIF}
uses
SysUtils,
// JEDI-SDL
sdl,
sdlutils,
GraphicsUnit,
GameObjectUnit,
GameConstantsUnit;
...and so on...
I've already installed all 3 packages for the last stable Lazarus, installed XCode from Apple's developer site and installed the SDL framework from the libsdl site for Mac OS X into my developer folders. (I would hope this is done properly anyhow I followed the instructions from the FPC/Laz wiki using the disk images aka the dmg files)
I've also updated my library and includes paths to match where my copy of JEDI-SDL is installed. I can compile just fine without the $PASCALMAINNAME line in my code, but the ran executable fails with all kinds of debugging information. To the best of my understanding somehow somewhere $PASCALMAINNAME does not exist as a symbol in either the version of FPC or Lazarus that I'm using.
Does anyone know whats going on and what I have to do to fix this? This is a stone wall to any further software development for me.
Bookmarks