2D View error

Hi all,
I am using Qt 4.2.2 & VC 8.0 , OS as windows XP.
My program runs well on my system when i try to create a 2d View by associating v2d_view with Wnt_driver and V2d_viewer.
But when i try to execute the exe of the program in other system by binding all dlls required it ends up with run time error.

Following is the code:
int windowHandle = (int) winId();
short hi, lo;

lo = (short) windowHandle;
hi = (short) (windowHandle >> 16);

#ifdef WNT
Handle(WNT_Window) hWnd = new WNT_Window(mydoc-> myGraphicDevice,(int) hi,(int) lo);
#else
Handle(Xw_Window) hWnd = new Xw_Window(Handle(Xw_GraphicDevice)::DownCast(this->mydoc->get2dViewer()->Device()),(int) hi,(int) lo,Xw_WQ_SAMEQUALITY);
#endif
// WNT

try
{

hWnd->SetBackground(Quantity_NOC_BLACK);
#ifdef WNT
Handle(WNT_WDriver) aDriver= new WNT_WDriver(hWnd);
#else
Handle(Xw_Driver) aDriver= new Xw_Driver(hWnd);
#endif // WNT

myV2dView = new V2d_View(aDriver,this->mydoc->get2dViewer());

}catch(Standard_Failure)
{ QMessageBox *msg=new QMessageBox(this);
msg->setWindowTitle("Error");
msg->setText("Error in initializing window driver..");
msg->show();
}

// in run time initializing window driver comes.

Please sort out my problem

Patrik Mueller's picture

Hi,

have you also copied/checked the OCC environment variables?

Greets,

Patrik

Rajesh Kishore's picture

My program is running fine on my system, but when i am trying to deploy my application on other system, it ends up with run time error.
The system in which i am deploying, Qt & OCC is not installed, for this i am binding all the required dlls of occ & qt.

Patrik Mueller's picture

If you look at your development system you will see some OCC defined user variables. They are also needed on the deployment system!

Rajesh Kishore's picture

Thanks Patrik,
It worked, Thanks a lot. People like you increases the interest in OCC.