On Sunday, December 8, 2002, at 04:15  am, Andy Ross wrote:

David Drum wrote:
> I am compiling FG 0.9.1 on Mac OS X.
>
> ld: Undefined symbols:
> _CPSEnableForegroundOperation
> _CPSGetCurrentProcess
> _CPSSetFrontProcess
> _CPSSetProcessName
>
> [...]
> I sent this to flightgear-users a couple days ago when 0.9.0 was out.
> No response.
My word. The reason these symbols are undefined is they're undocumented 'secret' Apple APIs (but very useful ones). They are used to assemble a hack that is doing the rounds of many ported Unix tools and libs : for example libSDL and gtk-quartz. I have so far contacted two people trying to trace the origins of the hack (waiting for Max Horn at the Fink project to see if he can find his source). I am probably going to propose this hack as an addition to debug builds of Mozilla (MachO builds), so it's getting fairly widespread : I didn't realize it has made it into FG / plib though.

Anyway, you need to link against an extra library. I did this:

grep -r "CPSEnableForegroundOperation" /System, and got the following (on Jaguar, be warned the link library may be different on Puma)

And it seems that the symbols are in the CoreGraphics framework (which you should get as part of CoreServices). I assume that for FG and plib we only link against Carbon, so of course we don't pick up any 'extra' CoreServices functions like this.

BTW, doing this:

nm /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ CoreGraphics.framework/CoreGraphics | grep "CPS"

turned up a whole slew of interestingly named methods! :-)

BTW, I haven't even got as far as linking due to problems with PLIB CVS versions (Mac gcc keeps moaning about Plib's ul.h, it seems to be getting included as C file, not a C++ one, and hence function overloading is not permitted). Haven't taken this up with the plib guys yet.

H&H
James


--
There is no such thing as a humble opinion.


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel


Reply via email to