Excellent, that's what I was forgetting. Of course, now the app has the same issues as any Mac GUI app compiled with GTK, in that even though it's a console app (sort of), it will only run under X11. And no way to compile for Carbon with lazbuild unless the framework carbon stuff already set in the .lpi.
Also, looking at some of the functions in Graphics.pp, I wonder if it's confusing to use TColor for params with functions like RedGreenBlue, InvertColor, etc. TColor can be a full RGB value _or_ a color constant like clBtnFace (value of 15). If someone passes a color constant to one of these functions, they'll get an unexpected result. So it seems as though RedGreenBlue, etc. should either call ColorToRGB first or else the param type should be LongInt or something to make it clearer that a color constant should not be passed. Same with ColorToRGB - in Delphi the return type is LongInt, not TColor, since it only returns RGB values, not color constants. Thanks. -Phil -----Original Message----- From: Mattias Gaertner [mailto:[EMAIL PROTECTED] Sent: Sat 2/9/2008 6:53 PM To: lazarus@miraclec.com Subject: Re: [lazarus] ColorToRGB in console app On Sat, 9 Feb 2008 15:42:22 -0500 "Hess, Philip J" <[EMAIL PROTECTED]> wrote: > > I need to call ColorToRGB in a console app. Adding Graphics to uses > allows lazbuild to compile the console app okay, but I get an AV when > running it, presumably because the widgetset that actually implements > ColorToRGB isn't getting linked into the app, as evidenced by otool > -L (on Mac): > > /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 88.1.10) > > If any widgetset code were linked in, I would see something like this: > > /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon > (compatibility version 2.0.0, current version > 128.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, > current version 88.1.10) > > This console app runs okay on Delphi. Is there something I'm missing > here or is this just not possible with Lazarus? Did you add the 'interfaces' unit as one of the first units of your program? Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives
<<winmail.dat>>