[osg-users] Can't createGraphicsContext if I statically link OSG to my app
Chris 'Xenon' Hanson
xenon at alphapixel.com
Wed Nov 18 09:43:40 PST 2009
Iñaki García wrote:
> And that's because that function is:
> static ref_ptr<GraphicsContext::WindowingSystemInterface>
> &windowingSystemInterfaceRef()
> {
> static ref_ptr<GraphicsContext::WindowingSystemInterface>
> s_WindowingSystemInterface;
> return s_WindowingSystemInterface;
> }
At a muddled glance (didn't sleep well last night) I suspect that
s_WindowingSystemInterface is actually set by some singleton code that is normally
instantiated during DLL init which doesn't happen in a static link.
A similar situation happens with the registration of the plugin/loader DLLs. I believe
you have to hunt down where the registration of the plugin is done, and force that to happen.
Perhaps someone who has done it more recently can comment. Though I was the original
instigator of the OSG static-link process on Windows, the last time I static linked OSG
was pre-OSG 1.0.
> Best regards
--
Chris 'Xenon' Hanson, omo sanza lettere Xenon AlphaPixel.com
PixelSense Landsat processing now available! http://www.alphapixel.com/demos/
"There is no Truth. There is only Perception. To Perceive is to Exist." - Xen
More information about the osg-users
mailing list