Page 1 of 2

Camera SDK + Qt = runtime error

Posted: Tue Jan 11, 2011 11:27 am
by Adun
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();
}

Re: Camera SDK + Qt = runtime error

Posted: Wed Jan 12, 2011 12:51 am
by Adun
Using this I can get only 10 frames. I tried also release SDK ( not beta) got the same result.

Re: Camera SDK + Qt = runtime error

Posted: Thu Jan 13, 2011 11:57 am
by beckdo
Have you built QT via the VS compiler and are using the QT VS plug-in within visual studio?

You're going to find that trying to integrate the Camera SDK directly into a mingw/QT IDE based app will not work correctly.

Re: Camera SDK + Qt = runtime error

Posted: Thu Jan 13, 2011 12:12 pm
by Adun
the problem is heap corruption if I use qt 4.7.1 pre built in MSVC 2008 in DLL form
When I recompile QT to static linking all fine. In your examples you use /MT flag not /MD flag and QT was built with this flag - so maybe here is the problem.

Re: Camera SDK + Qt = runtime error

Posted: Thu Jan 13, 2011 6:44 pm
by beckdo
Yes, the cameralibrary.dll is compiled with /MT. I've compiled a build for you with it set to /MD so you can try it. Please email support and let us know if that solves your problem.

Re: Camera SDK + Qt = runtime error

Posted: Thu Jan 13, 2011 11:27 pm
by Adun
Thanx, but I haven't got your dll. Have you send it to me?
Please send it to email in my profile or to another one grigoriev177 _at_ gmail.com

Re: Camera SDK + Qt = runtime error

Posted: Fri Jan 14, 2011 5:13 pm
by VincentG
We tried to email the file to you, but gmail does not accept attachments of that file type

Re: Camera SDK + Qt = runtime error

Posted: Mon Jan 17, 2011 10:56 pm
by Adun
I still haven't got your DLL, maybe you zip DLL and send it?

Re: Camera SDK + Qt = runtime error

Posted: Wed Jan 19, 2011 12:04 pm
by VincentG
resent to your .ru account

Re: Camera SDK + Qt = runtime error

Posted: Wed Feb 02, 2011 12:56 am
by Adun
All works fine
But I can't find in your new cameradll such properties like
object_mass_min,object_mass_max end etc.
Do you cancel to use them in new functionality?