Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 11-11-2009
Member
 
Join Date: Nov 2009
Posts: 2
sad linux QT Creator a error help me thanks!

in the main.cpp
the code

int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(application);
QApplication app(argc, argv);

LinuxWebcamGrabber *linuxweb = new LinuxWebcamGrabber();
linuxweb->start();
linuxweb->getFrame(); // here error
app.connect(&app, SIGNAL(lastWindowClosed()), &app, SLOT(quit()));
return app.exec();
}
in the otherfile
code :
......
class LinuxWebcamGrabber : public AbstractWebcamGrabber //让其成为 AbstractWebcamGrabber的子类
{
protected:
static int xioctl (int fd, int request, void *arg);

//QVector <uchar> imagebuffer;
public:
LinuxWebcamGrabber();

QImage* qimage;
int start();
int stop();
bool isGrabbingPossible();
int getFrame(QImage*); //here is the problem
..

the error show "There is no matching function"
but I have define the function in the other file
I try in main.cpp change code like this
linuxweb->getFrame(QImage*);

error :/home/haozi/distop/test-0.2.2./src/main.cpp:42: ERROR: expected primary-expression before ?*? token
there is some error with my Compiler?
Reply With Quote
  #2  
Old 11-11-2009
Member
 
Join Date: Aug 2004
Location: India
Posts: 76
Re: linux QT Creator a error help me thanks!

Thread title edited
Reply With Quote
  #3  
Old 11-11-2009
Member
 
Join Date: Nov 2008
Posts: 1,192
Re: linux QT Creator a error help me thanks!

Quote:
Originally Posted by chhaozi View Post
in the main.cpp

int main(int argc, char *argv[])
{
.............
linuxweb->getFrame(); // here error
......
}
Here you have not provided any value or an object. Basically the compiler will not take any value unless you have any default function that forces it to use. The above statement searches for a getFrame() which does not have any parameter inside the parenthesis (which is not available in your code).

Quote:
Originally Posted by chhaozi View Post
in the otherfile

......

QImage* qimage;
int start();
int stop();
bool isGrabbingPossible();
int getFrame(QImage*); //here is the problem
......

the error show "There is no matching function"
but I have define the function in the other file
I try in main.cpp change code like this
linuxweb->getFrame(QImage*);

error :/home/haozi/distop/test-0.2.2./src/main.cpp:42: ERROR: expected primary-expression before ?*? token
there is some error with my Compiler?
You are getting here the problem because you cannot use "QImage" over there. "QImage" and "qimage" is different. If you want to pass some object then please note that object names are case-sensitive.
Reply With Quote
  #4  
Old 11-11-2009
Member
 
Join Date: Nov 2009
Posts: 2
Re: linux QT Creator a error help me thanks!

-- much thanks !
the problem have ben kill
in the main.cpp
as void said .
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags:



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "linux QT Creator a error help me thanks!"
Thread Thread Starter Forum Replies Last Post
cant enable audio CD information download in label creator of Roxio Creator 2012 Oppilaa Windows Software 2 15-05-2012 10:37 AM
Getting error message while booting with ubuntu 10.10's usb-creator-gtk Suryavansham Operating Systems 9 03-04-2012 07:19 PM
USB creator annoying pop ups on Linux Mint 9 Chillam Operating Systems 3 14-01-2011 02:08 AM
Toshiba Disk Creator Error Lishi Hardware Peripherals 3 02-09-2009 10:02 AM


All times are GMT +5.5. The time now is 11:29 AM.