Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QCamera error LNK1120 (with Visual Studio+Qt6.5.2)
Forum Updated to NodeBB v4.3 + New Features

QCamera error LNK1120 (with Visual Studio+Qt6.5.2)

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
2 Posts 2 Posters 957 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Ammie
    wrote on last edited by
    #1

    I am trying and tryin to define a QCamera Variable in my Code, but always comes an exception or this error:
    Qt3BotonCalibrar.obj : error LNK2019: símbolo externo "__declspec(dllimport) public: virtual __cdecl QCamera::~QCamera(void)" (_imp??1QCamera@@UEAA@XZ)
    This is happening everytime I write in my MainWIndow.h "QCamera *camarita = new QCamera;"

    #pragma once

    #include <QtWidgets/QMainWindow>
    #include <QPainter>
    #include "ui_Qt3BotonCalibrar.h"
    #include "ui_WidgetForm_V2.h" //<---V2---- Incluir su librería
    #include "ui_WidgetForm_V3.h" //<---V2---- Incluir su librería

    #include <QtCore> //Para el timer

    #include <iostream> //para los int del tamaño de la pantalla
    #include <Windows.h> //para los int del tamaño de la pantalla

    #include <QtMultimedia/QCamera>
    //#include <QCamera>
    //#include <QtMultimediaWidgets/QCameraViewfinder>
    #include "qcamera.h"
    //#include "QtMultimedia/qcamera.h"
    //#include "QtMultimedia/QCameraInfo.h"

    class Qt3BotonCalibrar : public QMainWindow
    {
    Q_OBJECT

    public:
    Qt3BotonCalibrar(QWidget *parent = Q_NULLPTR);
    void paintEvent(QPaintEvent *event);
    QTimer reloj;
    static int contador;
    QCamera camarita = new QCamera;// ("/dev/video0");
    //QCameraViewfinder
    viewfinder = new QCameraViewfinder;
    //camarita->setViewfinder(viewfinder);

    It seems to be a problem with libreria or includes, but I have already tried to add <QCamera>, and also added "$(QTDIR)\include;$(QTDIR)\include\QtMultimedia;" in Proyect-Properties in Visual Studio, but no way...
    I have checked and the Files are in those folders, but still not working and I am running out of ideas.
    Could you please help me?

    mrjjM 1 Reply Last reply
    0
    • A Ammie

      I am trying and tryin to define a QCamera Variable in my Code, but always comes an exception or this error:
      Qt3BotonCalibrar.obj : error LNK2019: símbolo externo "__declspec(dllimport) public: virtual __cdecl QCamera::~QCamera(void)" (_imp??1QCamera@@UEAA@XZ)
      This is happening everytime I write in my MainWIndow.h "QCamera *camarita = new QCamera;"

      #pragma once

      #include <QtWidgets/QMainWindow>
      #include <QPainter>
      #include "ui_Qt3BotonCalibrar.h"
      #include "ui_WidgetForm_V2.h" //<---V2---- Incluir su librería
      #include "ui_WidgetForm_V3.h" //<---V2---- Incluir su librería

      #include <QtCore> //Para el timer

      #include <iostream> //para los int del tamaño de la pantalla
      #include <Windows.h> //para los int del tamaño de la pantalla

      #include <QtMultimedia/QCamera>
      //#include <QCamera>
      //#include <QtMultimediaWidgets/QCameraViewfinder>
      #include "qcamera.h"
      //#include "QtMultimedia/qcamera.h"
      //#include "QtMultimedia/QCameraInfo.h"

      class Qt3BotonCalibrar : public QMainWindow
      {
      Q_OBJECT

      public:
      Qt3BotonCalibrar(QWidget *parent = Q_NULLPTR);
      void paintEvent(QPaintEvent *event);
      QTimer reloj;
      static int contador;
      QCamera camarita = new QCamera;// ("/dev/video0");
      //QCameraViewfinder
      viewfinder = new QCameraViewfinder;
      //camarita->setViewfinder(viewfinder);

      It seems to be a problem with libreria or includes, but I have already tried to add <QCamera>, and also added "$(QTDIR)\include;$(QTDIR)\include\QtMultimedia;" in Proyect-Properties in Visual Studio, but no way...
      I have checked and the Files are in those folders, but still not working and I am running out of ideas.
      Could you please help me?

      mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      @Ammie said in QCamera error LNK1120 (with Visual Studio+Qt6.5.2):

      QCamera

      You need to add
      QT += multimedia
      to your .pro file.

      alt text

      1 Reply Last reply
      1

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved