Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Installation and building / Successfully built as static lib (solved TKOpenGL dinamic load)

Successfully built as static lib (solved TKOpenGL dinamic load)

Successfully built as static lib (solved TKOpenGL dinamic load)
Massimo Del Fedele 2011/09/20 21:28
Hi all,

As I didn't found a solution, I made a small patch that allows to statically link OpenCascade, including the TKOpenGL stuff.
It's enough to modify Graphic3d_GraphicDevice.cxx file as :

extern "C"
{
     Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory(const Standard_CString AShrName);
}


void Graphic3d_GraphicDevice::SetGraphicDriver ()
{

     Handle(Graphic3d_GraphicDriver)(*fp) (Standard_CString) = NULL;
     fp = (Handle(Graphic3d_GraphicDriver)(*) (Standard_CString)) MetaGraphicDriverFactory;
     Standard_CString aSharedName = "something";
     MyGraphicDriver = (*fp)(aSharedName);
}

of course, it would be possible to check if statically built or not and choose between old and
new code.

Ciao

Max
Massimo Del Fedele 2011/09/20 21:38
Or, even *much* simpler......

extern "C"
{
     Handle(Graphic3d_GraphicDriver) MetaGraphicDriverFactory(const Standard_CString AShrName);
}

void Graphic3d_GraphicDevice::SetGraphicDriver ()
{
     MyGraphicDriver = MetaGraphicDriverFactory("");
}

Just an one-line patch :-)

Ciao

Max
QiweiLiu 2013/05/15 17:45
      It's very nice.I'll try.
 
 
Latest news
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!
  • Open CASCADE Technology 6.7.0 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map