Hey everyone,
I’ve been trying to compile Panda on OS X Snow Leopard as a 64-bit library, but I’ve run into a huge stack of “not declared in this scope” errors when trying to build the osxdisplay module. As far as I can tell from Google, these undeclared things are all features of Carbon, and many features of Carbon were never ported to 64-bit. Does anyone know A) if there’s a trick to making osxdisplay compile for 64-bit architectures, B) if there’s a way to make a 64-bit build of panda use a 32-bit build of osxdisplay, or C) if there’s an alternative to osxdisplay?
Or, D) if I rebuilt panda for i386, would I be able to call it from my 64-bit python installation?
Thanks!
Errors:
cd ./src/osxdisplay && make all
g++ -ftemplate-depth-30 -Wno-deprecated-declarations -c -o Opt3-OSX/osxdisplay_osxGraphicsWindow.o -I. -I/Users/dplepage/Downloads/panda3d/panda -I../cull -I../display -I../downloader -I../effects -I../event -I../express -I../glgsg -I../glstuff -I../gobj -I../gsgbase -I../lerp -I../linmath -I../mathutil -I../nativenet -I../net -I../pandabase -I../pgraph -I../pgraphnodes -I../pipeline -I../pnmimage -I../pstatclient -I../putil -I/usr/local/panda/include -I/opt/local/include -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/usr/include -I/Library/Frameworks/Cg.framework/Headers -I/opt/local/include -I/Library/Frameworks/Cg.framework/Headers -I/opt/local/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -I/opt/local/include -I/opt/local/include -I/opt/local/include/openssl -I/opt/local/include -I/opt/local/include -g -O2 -fPIC osxGraphicsWindow.mm
<snip out random GL warnings>
osxGraphicsWindow.mm: In static member function ‘static osxGraphicsWindow* osxGraphicsWindow::get_current_osx_window(OpaqueWindowPtr*)’:
osxGraphicsWindow.mm:106: error: ‘GetFrontWindowOfClass’ was not declared in this scope
osxGraphicsWindow.mm:108: error: ‘FrontNonFloatingWindow’ was not declared in this scope
osxGraphicsWindow.mm:113: error: ‘GetWRefCon’ was not declared in this scope
osxGraphicsWindow.mm: In function ‘void composite_gl_buffer_into_window(__AGLContextRec*, Rect*, OpaqueGrafPtr*)’:
osxGraphicsWindow.mm:195: error: ‘NewGWorldFromPtr’ was not declared in this scope
osxGraphicsWindow.mm:204: error: ‘QDSwapPort’ was not declared in this scope
osxGraphicsWindow.mm:206: error: ‘GetPortBitMapForCopyBits’ was not declared in this scope
osxGraphicsWindow.mm:208: error: ‘CopyBits’ was not declared in this scope
osxGraphicsWindow.mm:214: error: ‘DisposeGWorld’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘OSStatus osxGraphicsWindow::event_handler(OpaqueEventHandlerCallRef*, OpaqueEventRef*)’:
osxGraphicsWindow.mm:275: error: ‘FrontNonFloatingWindow’ was not declared in this scope
osxGraphicsWindow.mm:276: error: ‘SetUserFocusWindow’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘void osxGraphicsWindow::do_resize()’:
osxGraphicsWindow.mm:390: error: ‘GetWindowPortBounds’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘OSStatus osxGraphicsWindow::handle_text_input(OpaqueEventHandlerCallRef*, OpaqueEventRef*)’:
osxGraphicsWindow.mm:510: error: cannot convert ‘UInt32*’ to ‘ByteCount*’ for argument ‘6’ to ‘OSStatus GetEventParameter(OpaqueEventRef*, EventParamName, EventParamType, EventParamType*, ByteCount, ByteCount*, void*)’
osxGraphicsWindow.mm: In member function ‘void osxGraphicsWindow::release_system_resources(bool)’:
osxGraphicsWindow.mm:554: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm:564: error: ‘SetWRefCon’ was not declared in this scope
osxGraphicsWindow.mm:565: error: ‘HideWindow’ was not declared in this scope
osxGraphicsWindow.mm:566: error: ‘DisposeWindow’ was not declared in this scope
osxGraphicsWindow.mm: In destructor ‘virtual osxGraphicsWindow::~osxGraphicsWindow()’:
osxGraphicsWindow.mm:657: error: ‘SetWRefCon’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘virtual bool osxGraphicsWindow::begin_frame(GraphicsOutput::FrameMode, Thread*)’:
osxGraphicsWindow.mm:842: error: ‘BeginCGContextForApplicationDockTile’ was not declared in this scope
osxGraphicsWindow.mm:844: error: ‘SetApplicationDockTileImage’ was not declared in this scope
osxGraphicsWindow.mm:845: error: ‘EndCGContextForApplicationDockTile’ was not declared in this scope
osxGraphicsWindow.mm:865: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘virtual void osxGraphicsWindow::begin_flip()’:
osxGraphicsWindow.mm:949: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘bool osxGraphicsWindow::os_open_window(WindowProperties&)’:
osxGraphicsWindow.mm:1210: error: ‘CreateNewWindow’ was not declared in this scope
osxGraphicsWindow.mm:1217: error: ‘GetMainDevice’ was not declared in this scope
osxGraphicsWindow.mm:1217: error: ‘GetAvailableWindowPositioningBounds’ was not declared in this scope
osxGraphicsWindow.mm:1228: error: ‘CreateNewWindow’ was not declared in this scope
osxGraphicsWindow.mm:1250: error: ‘SetWRefCon’ was not declared in this scope
osxGraphicsWindow.mm:1252: error: ‘GetWindowEventTarget’ was not declared in this scope
osxGraphicsWindow.mm:1254: error: ‘ShowWindow’ was not declared in this scope
osxGraphicsWindow.mm:1264: error: ‘HideWindow’ was not declared in this scope
osxGraphicsWindow.mm:1266: error: ‘DisposeWindow’ was not declared in this scope
osxGraphicsWindow.mm:1280: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm:1298: error: ‘GetWindowPortBounds’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘void osxGraphicsWindow::system_point_to_local_point(Point&)’:
osxGraphicsWindow.mm:1423: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm:1423: error: ‘QDSwapPort’ was not declared in this scope
osxGraphicsWindow.mm:1425: error: ‘GlobalToLocal’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘OSStatus osxGraphicsWindow::handle_window_mouse_events(OpaqueEventHandlerCallRef*, OpaqueEventRef*)’:
osxGraphicsWindow.mm:1464: error: ‘GetWindowPortBounds’ was not declared in this scope
osxGraphicsWindow.mm:1520: error: ‘typeLongInteger’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘virtual bool osxGraphicsWindow::do_reshape_request(int, int, bool, int, int)’:
osxGraphicsWindow.mm:1851: error: ‘MoveWindow’ was not declared in this scope
osxGraphicsWindow.mm:1859: error: ‘GetMainDevice’ was not declared in this scope
osxGraphicsWindow.mm:1859: error: ‘GetAvailableWindowPositioningBounds’ was not declared in this scope
osxGraphicsWindow.mm:1865: error: ‘SizeWindow’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘virtual void osxGraphicsWindow::set_properties_now(WindowProperties&)’:
osxGraphicsWindow.mm:1946: error: ‘SetWindowTitleWithCFString’ was not declared in this scope
osxGraphicsWindow.mm: In member function ‘void osxGraphicsWindow::local_point_to_system_point(Point&)’:
osxGraphicsWindow.mm:2003: error: ‘GetWindowPort’ was not declared in this scope
osxGraphicsWindow.mm:2003: error: ‘QDSwapPort’ was not declared in this scope
osxGraphicsWindow.mm:2005: error: ‘LocalToGlobal’ was not declared in this scope