I am creating in C++ one program, where you can create Userprofiles. The User should have the option to take one photo with for example the notebook camera. I already read a lot about QCamera und try to use this. I already imported QtMultimedia in my qml file. Now I first try to search for available camera, but there are always a lot of errors. I don't know what I maybe forget, or why I can't find anything. I wanted to make some tests, just to get a little bit more in contact with the QCamera class. I included: QTextStream, QtMultimedia/QCameraInfo and QtMultimedia/QCamera
Here is my test code:
int main(int argc, char* argv[])
{
QTextStream out(stdout);
out << QCameraInfo::defaultCamera().deviceName() << endl;
for(int i = 0; i < QCameraInfo::availableCameras().size(); i++)
{
out << QCameraInfo::availableCameras().at(i).deviceName() << endl;
}
return 0;
}
There is always these errors:
...\QT\test\main.cpp:23: Fehler: undefined reference to_imp___ZN11QCameraInfo13defaultCameraEv',
...\QT\test\main.cpp:23: Fehler: undefined reference to
_imp___ZNK11QCameraInfo10deviceNameEv',
some more, but almost the same error-info.
and this one:
collect2.exe:-1: Fehler: error: ld returned 1 exit status