[Pythonmac-SIG] Newbie Building 2.3a2+ (framework) on OS X 10.1 gets 'Undefined symbol _CGMainDisplayID'

Randy Wiser rwiser@metrowerks.com
Thu, 10 Apr 2003 20:37:20 -0700


(Apologies if this was already posted)
I've successfully built and run Python (which I checked out after 2.3 alpha 2) on OS X 10.2.  Unfortunately the product is supposed to run on OS X 10.1 as well, so I'm attempting to build the same source on 10.1.  Apparently Apple did not make CGMainDisplayID() available in 10.1?

Thanks in advance for any ideas on how to avoid this problem (and get a good framework build on 10.1),

- Randy

 I give the following commands and get the following error:

./configure --enable-shared --enable-framework LDFLAGS=-Wl,-x (arguments sent to configure)

make

building 'MacOS' extension
gcc -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -Wno-long-double -no-cpp-precomp -fno-common -dynamic -I. -I/Users/ctbuild/download/python.o
rg/srccopy/./Include -I/Users/ctbuild/download/python.org/srccopy/./Mac/Include -I/Users/ctbuild/download/python.org/srccopy/Include -I/Us
ers/ctbuild/download/python.org/srccopy -c /Users/ctbuild/download/python.org/srccopy/Mac/Modules/macosmodule.c -o build/temp.darwin-5.2.2
-Power_Macintosh-2.3/macosmodule.o
In file included from /System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h:33,
                 from /System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h:5,
                 from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:20,
                 from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
                 from /System/Library/Frameworks/Carbon.framework/Headers/Carbon.h:20,
                 from /Users/ctbuild/download/python.org/srccopy/Mac/Include/macglue.h:32,
                 from /Users/ctbuild/download/python.org/srccopy/Mac/Modules/macosmodule.c:28:
/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h:291: warning: function dec
laration isn't a prototype
/System/Library/Frameworks/CoreServices.framework/Headers/../Frameworks/CarbonCore.framework/Headers/MacTypes.h:292: warning: function dec
laration isn't a prototype
/Users/ctbuild/download/python.org/srccopy/Mac/Modules/macosmodule.c: In function `MacOS_WMAvailable':
/Users/ctbuild/download/python.org/srccopy/Mac/Modules/macosmodule.c:548: warning: implicit declaration of function `CGMainDisplayID'
gcc -Wl,-x -Wl,-F. -bundle -framework Python build/temp.darwin-5.2.2-Power_Macintosh-2.3/macosmodule.o -o build/lib.darwin-5.2.2-Power_Mac
intosh-2.3/MacOS.so -framework Carbon
/usr/bin/ld: Undefined symbols:
_CGMainDisplayID