[vtk-developers] extension wrangler

David C. Thompson dcthomp at sandia.gov
Thu Nov 17 13:30:41 EST 2005


> The problem is, it is hard to accurately pick exactly which library
> file a linker is going to link against.  We were running into problems
> where we identified a shared OpenGL library that probably should have
> been used, but the linker was using a different library.  And if the
> binaries are moved to a different machine, the whole thing can break
> down.
>  
> If there was a way to query at runtime what shared objects were
> loaded, identify which one was OpenGL, and then call dlopen on that,
> that would probably work.  However, I don't know of any way to do that
> query.
What if, instead, you don't link to OpenGL at all at compile time? There
would be a class full of static function pointers that rendering classes
could use. At run time you could dlopen OpenGL and populate the function
pointers with valid addresses. That might alleviate some gl.h header
file inconsistencies as well.

	David




More information about the vtk-developers mailing list