Dirk Reiners wrote: > Hi Patrick, > > On Wed, 2005-04-20 at 20:57 -0500, Patrick Hartling wrote: > >>Here you go: >> >>#0 0x00000000 in ?? () >>Cannot access memory at address 0x0 >>Cannot access memory at address 0x0 >>#1 0x18f808f0 in GeoPump129(osg::Window*, osg::Geometry*) >>(win=0x24801a8, geo=0x2471238) at >>/Users/patrick/src/OpenSG/OpenSG-1.4.0/Source/System/NodeCores/Drawables/Geometry/OSGGeoPumpFactory.cpp:792 > > > That is the glActiveTexture call. Looking at the commit log, that was > fixed a couple days after 1.4... :(
Updating to the latest CVS version fixed things up quite nicely. OpenSG
is the coolest! :)
>>No, unfortunately not. The generated file
>>Builds/powerpc-apple-darwin-g++/Makefile does not include WindowXLib in
>>the list set for $(SUB_LIBS), and even if it did, that directory tree
>>isn't present under the build directory.
>
>
> Yes, you have to patch the configure script to make that happen (no clue
> whether it will actually compile, but it would enable it):
>
> if test ${ac_gdz_package_name} = "WindowX"; then
> case ${build_os} in
>
> cygwin*)
> echo Skipping ${ac_gdz_package_name}
> continue
> ;;
>
>> darwin*)
>> echo Skipping ${ac_gdz_package_name}
>> continue
>> ;;
>
> remove these
>
> *)
> ac_gdz_package_order="${ac_gdz_package_order} WindowXLib"
> ac_gdz_package_order_test="${ac_gdz_package_order_test}
> WindowXTest"
> ;;
> esac
> fi
As it turns out, I don't to build the OpenSG X11 code on OS X (which is
what Allen Bierbaum told me when I was first trying to figure this out).
However, making the above change did allow me to get started with
compiling the OpenSG X11 code. OSGXWindow.cpp and OSGXWindowBase.cpp
both compile, but I get this error during linking:
c++ -dynamiclib -compatibility_version 1.2 -current_version 1.2.0
-Wl,-single_module -flat_namespace -o lib-dbg/libOSGWindowX.dylib \
-L/Users/patrick/src/OpenSG/OpenSG-cvs/Builds/powerpc-apple-darwin-g++/SystemLib/lib-dbg
-L/Users/patrick/src/OpenSG/OpenSG-cvs/Builds/powerpc-apple-darwin-g++/BaseLib/lib-dbg
obj-dbg/OSGXWindow.o obj-dbg/OSGXWindowBase.o -lOSGSystem -lOSGBase
-framework OpenGL -lm \
-L/usr/X11R6/lib -g -install_name libOSGWindowX.dylib
ld: Undefined symbols:
_XGetVisualInfo
_XGetWindowAttributes
_XOpenDisplay
_XVisualIDFromVisual
_glXCreateContext
_glXGetConfig
_glXMakeCurrent
_glXSwapBuffers
common.mk lib-dbglnk/ lib-optlnk/ obj-dbglnk/ obj-optlnk/
/usr/bin/libtool: internal link edit command failed
make[2]: *** [lib-dbg/libOSGWindowX.dylib] Error 1
I can't quite figure out the safest place to add the linker options for
the X11 libraries. I'm guessing that the generated file
CommonPackages/commonGL.mk should be changed to use the Linux-style
options rather than the OS X OpenGL framework (that's how VR Juggler
currently does it), but that might impact the ability to link other
OpenSG libraries.
At this point, I think it's probably best if I don't worry about using
OpenSG's X11 support on Mac OS X. As I said in an earlier post, using
the GLUT framework works wonderfully, and it looks as though I can use
OpenSG with VR Juggler without needing OpenSG's X11 support.
Thanks for the help.
-Patrick
--
Patrick L. Hartling | VP Engineering, Infiscape Corp.
PGP: http://tinyurl.com/2msw3 | http://www.infiscape.com/
signature.asc
Description: OpenPGP digital signature
