Camera SDK + Qt = runtime error

Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Camera SDK + Qt = runtime error

Post 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();
}
Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Re: Camera SDK + Qt = runtime error

Post by Adun »

Using this I can get only 10 frames. I tried also release SDK ( not beta) got the same result.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Camera SDK + Qt = runtime error

Post 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.
Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Re: Camera SDK + Qt = runtime error

Post 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.
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: Camera SDK + Qt = runtime error

Post 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.
Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Re: Camera SDK + Qt = runtime error

Post 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
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: Camera SDK + Qt = runtime error

Post by VincentG »

We tried to email the file to you, but gmail does not accept attachments of that file type
Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Re: Camera SDK + Qt = runtime error

Post by Adun »

I still haven't got your DLL, maybe you zip DLL and send it?
VincentG
Posts: 7728
Joined: Mon Jul 17, 2006 5:00 am
Location: Corvallis, Oregon

Re: Camera SDK + Qt = runtime error

Post by VincentG »

resent to your .ru account
Adun
Posts: 12
Joined: Tue Sep 29, 2009 10:42 pm

Re: Camera SDK + Qt = runtime error

Post 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?
Post Reply