CL-Eye Platform SDK .h file issue
Posted: 05 February 2011 01:06 PM   [ Ignore ]
New Member
Rank
Total Posts:  3
Joined  2011-01-02

Hi all ,

First of all thanks for this great CL-Eye SDK , am trying to use the SDK with eclipse I used the .lib file in :
Code Laboratories\CL-Eye Platform SDK\Lib
but used the .h file in here :
http://codelaboratories.com/research/view/cl-eye-muticamera-api
as the .h file in :
Code Laboratories\CL-Eye Platform SDK\Include
gives me syntax error something like :

g++ -IC:\OpenCV\PS3 -IC:\OpenCV\cv\include 
-IC:\OpenCV\videoInput0.1991\compiledLib\compiledByDevCpp\include -IC:\OpenCV\cvaux\include -IC:\OpenCV\cxcore\include -IC:\OpenCV\otherlibs\highgui 
-IC:\OpenCV\otherlibs\cvcam\include -O0 -g3 -Wall --fmessage-length=-oPS3...\PS3.cpp
In file included from 
..\PS3.cpp:17:
C:/OpenCV/PS3/CLEyeMulticam.h:68:1pasting ")" and "int" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:69:1pasting ")" and "GUID" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:72:1pasting ")" and "CLEyeCameraInstance" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:74:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:77:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:78:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:81:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:84:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:85:1pasting ")" and "int" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:88:1pasting ")" and "bool" does not give a valid preprocessing token
C
:/OpenCV/PS3/CLEyeMulticam.h:89:1pasting ")" and "bool" does not give a valid preprocessing token
..\PS3.cppIn function `int main(int, CHAR**)':
..\PS3.cpp:139: warning: unsigned int format, long unsigned int arg (arg 2)
..\PS3.cpp:149: warning: unused variable 'param'
Build error occurred, build is stopped
Time consumed: 1250  ms. 

after the program ran successfully , the capturing doesn’t seem to agree with it
it capture a black window and may be after time display some distortion of the image , although the .exe files in the Bin folder works
very well

I’m very confused whether the .h file give this impact or how to solve the problem

Thanks in advance ,

Profile
 
 
Posted: 24 February 2011 12:21 AM   [ Ignore ]   [ # 1 ]
New Member
Rank
Total Posts:  4
Joined  2011-02-20

Hi Sara
I have The same problem in QT SDK, Qt Creater 2.0.0 based on QT 4.7
I used the .h file in http://codelaboratories.com/research/view/cl-eye-muticamera-api
and the errors disappeared
but when trying to run

class CLEyeCameraCapture
{
        CHAR _windowName[256]
;
        
GUID _cameraGUID;
        
CLEyeCameraInstance _cam;
        
CLEyeCameraColorMode _mode;
        
CLEyeCameraResolution _resolution;
        
float _fps;
        
HANDLE _hThread;
        
bool _running;

                .
                .
                .

};


int main(int argcchar *argv[])
{
    QApplication a
(argcargv);

    
CLEyeCameraCapture *cam[2] { NULL };
    
srand(GetTickCount());
    
// Query for number of connected cameras
    
int numCams CLEyeGetCameraCount();
    if(
numCams == 0)
    
{
        qDebug
("No PS3Eye cameras detected\n");
        return -
1;
    
}
    qDebug
("Found %d cameras\n"numCams);

    return 
a.exec();

got the following linker error

undefined reference to `_imp__CLEyeGetCameraCount’

have u got any solutions?!

Profile
 
 
Posted: 03 November 2011 01:26 PM   [ Ignore ]   [ # 2 ]
New Member
Rank
Total Posts:  1
Joined  2011-11-03

Hi,

in case anyone still experiences this issue, I got the same when trying to include CLEyeMulticam.h. The resolution is actually really easy, this has to do with a difference between the preprocessor of MSVC and that of GNU compiler.

Replace

#define IMPORT(type) extern "C" __declspec(dllimport)## type __cdecl 

With

#define IMPORT(type) extern "C" __declspec(dllimport) type __cdecl 

Then it should compile fine.

Goodluck, menno

Profile
 
 
Posted: 19 April 2012 02:04 AM   [ Ignore ]   [ # 3 ]
New Member
Rank
Total Posts:  3
Joined  2011-01-02

Thanks mennowo , The solution works great !
after working with MSVS , now I can get back to eclipse smile

Profile
 
 
 
 


RSS 2.0     Atom Feed