(Solved)QT 5.4 and MSVS 2013



  • Hi all,
    i am getting the following errors
    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl QWebEngineView::QWebEngineView(class QWidget *)" (_imp??0QWebEngineView@@QEAA@PEAVQWidget@@@Z) referenced in function "public: __cdecl CMainWindow::CMainWindow(class QWidget *)" (??0CMainWindow@@QEAA@PEAVQWidget@@@Z)
    mainwindow.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl QWebEngineView::~QWebEngineView(void)" (_imp??1QWebEngineView@@UEAA@XZ) referenced in function "public: virtual void * __cdecl QWebEngineView::`scalar deleting destructor'(unsigned int)" (??_GQWebEngineView@@UEAAPEAXI@Z)
    mainwindow.obj:-1: error: LNK2001: unresolved external symbol "protected: virtual class QWebEngineView * __cdecl QWebEngineView::createWindow(enum QWebEnginePage::WebWindowType)" (?createWindow@QWebEngineView@@MEAAPEAV1@W4WebWindowType@QWebEnginePage@@@Z)



  • Hi, did you add QT += webenginewidgets to your .pro file?



  • yes .



  • hi this is my .pro file

    QT += core gui

    QT += webenginewidgets network printsupport

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = QtWeb
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    cmywidget.cpp

    HEADERS += mainwindow.h
    cmywidget.h

    FORMS += cmainwindow.ui

    then i run qmake and rebuild again.
    then no error is there even i have included
    #include <QtWebEngineWidgets/QtWebEngineWidgets>
    #include <QtWebEngineWidgets/QWebEngineView>

    QWebEngineView *view;

    but when i allocate memory to view

    view = new QWebEngineView(pvWid);

    then the above errors occurred.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.