Camera SDK + Qt = runtime error
Posted: Tue Jan 11, 2011 11:27 am
Hi guys!
I try to integrate Camera SDK beta and Qt 4.7.0 under MSVC 2008
So I got runtime error in this simple code. So there is no debug library so I can't trace error.
int main(int argc, char *argv[])
{
CameraLibrary_EnableDevelopment();
//== Initialize connected cameras ==========----
CameraManager::X().WaitForInitialization();
//== Get a connected camera ================----
Camera* camera = CameraManager::X().GetCamera();
if(camera==0)
{
MessageBox(0,"Please connect a camera","No Device Connected", MB_OK);
// return 1;
}
//== Determine camera resolution to size application window ==----
int cameraWidth = camera->Width();
int cameraHeight = camera->Height();
int WindowWidth = 800;
int WindowHeight = 450;
camera->SetVideoType(SegmentMode);
//== Start camera output ==--
camera->Start();
//== Turn on some overlay text so it's clear things are ===---
//== working even if there is nothing in the camera's view. ===---
camera->SetTextOverlay(false);
QApplication a(argc, argv);
qt1 w;
return a.exec();
}
I try to integrate Camera SDK beta and Qt 4.7.0 under MSVC 2008
So I got runtime error in this simple code. So there is no debug library so I can't trace error.
int main(int argc, char *argv[])
{
CameraLibrary_EnableDevelopment();
//== Initialize connected cameras ==========----
CameraManager::X().WaitForInitialization();
//== Get a connected camera ================----
Camera* camera = CameraManager::X().GetCamera();
if(camera==0)
{
MessageBox(0,"Please connect a camera","No Device Connected", MB_OK);
// return 1;
}
//== Determine camera resolution to size application window ==----
int cameraWidth = camera->Width();
int cameraHeight = camera->Height();
int WindowWidth = 800;
int WindowHeight = 450;
camera->SetVideoType(SegmentMode);
//== Start camera output ==--
camera->Start();
//== Turn on some overlay text so it's clear things are ===---
//== working even if there is nothing in the camera's view. ===---
camera->SetTextOverlay(false);
QApplication a(argc, argv);
qt1 w;
return a.exec();
}