Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. C++ Qt 6.7.2 VLC, VLC-Qt
Forum Updated to NodeBB v4.3 + New Features

C++ Qt 6.7.2 VLC, VLC-Qt

Scheduled Pinned Locked Moved Solved General and Desktop
10 Posts 3 Posters 1.3k 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.
  • VitallllV Offline
    VitallllV Offline
    Vitallll
    wrote on last edited by
    #1

    Hi,

    when I try build app with VLC-Qt I'm getting this errors:

    04c22c54-04e3-4316-a5df-addcc0d1187f-image.png

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) class QList<class QString> __cdecl VlcCommon::args(void)" (_imp?args@VlcCommon@@YA?AV?$QList@VQString@@@@XZ) referenced in function main

    main.obj:-1: error: LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl VlcInstance::VlcInstance(class QList<class QString> const &,class QObject *)" (_imp??0VlcInstance@@QEAA@AEBV?$QList@VQString@@@@PEAVQObject@@@Z) referenced in function main

    This is my code:
    #include <QApplication>
    #include <QMainWindow>
    #include <VLCQtCore/Common.h>
    #include <VLCQtCore/Instance.h>
    #include <VLCQtCore/Media.h>
    #include <VLCQtCore/MediaPlayer.h>
    #include <VLCQtWidgets/WidgetVideo.h>
    
    int main(int argc, char *argv[])
    {
        QApplication app(argc, argv);
    
        QMainWindow mainWindow;
    
        VlcWidgetVideo *videoWidget = new VlcWidgetVideo(&mainWindow);
    
        QList<QString> args = VlcCommon::args();
        VlcInstance *instance = new VlcInstance(args, &mainWindow);
        VlcMediaPlayer *player = new VlcMediaPlayer(instance);
        player->setVideoWidget(videoWidget);
    
        mainWindow.setCentralWidget(videoWidget);
        mainWindow.resize(800, 600);
    
        VlcMedia *media = new VlcMedia("path/to/your/video/file.mp4", true, instance);
        player->open(media);
        player->play();
    
        mainWindow.show();
    
        return app.exec();
    }
    
    

    But when I try with commented

    QList<QString> args ;//= VlcCommon::args();
    VlcInstance *instance;// = new VlcInstance(args, &mainWindow);
    
    It compiles and I getting this:bb69a827-c540-4429-b740-befbb796b67c-image.png

    So I don't understand problems with my .libs or something else.
    I downloaded VLC-Qt from https://vlc-qt.tano.si/. (Windows 64-bit (MSVC 2013))
    Compiler I used for building MSVC 2019 64 bit

    my .pro:
    QT       += core gui
    
    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
    
    CONFIG += c++17
    TARGET = VlcQtExample
    TEMPLATE = app
    
    SOURCES += \
        main.cpp \
        mainwindow.cpp
    
    HEADERS += \
        mainwindow.h
    
    FORMS += \
        mainwindow.ui
    
    INCLUDEPATH += D:/vlc-qt/include
    
    LIBS += -LD:/vlc-qt/lib
    LIBS += -lVLCQtCore -lVLCQtWidgets -lVLCQtCored -lVLCQtWidgetsd
    
    qnx: target.path = /tmp/$${TARGET}/bin
    else: unix:!android: target.path = /opt/$${TARGET}/bin
    !isEmpty(target.path): INSTALLS += target
    
    

    Thanks for any help

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      You can not mix msvc2019 and 2013 iirc.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      VitallllV 1 Reply Last reply
      0
      • artwawA Offline
        artwawA Offline
        artwaw
        wrote on last edited by
        #3

        On top of that I think VLC asks for Qt5 while you're using Qt6?

        For more information please re-read.

        Kind Regards,
        Artur

        VitallllV Christian EhrlicherC 2 Replies Last reply
        1
        • Christian EhrlicherC Christian Ehrlicher

          You can not mix msvc2019 and 2013 iirc.

          VitallllV Offline
          VitallllV Offline
          Vitallll
          wrote on last edited by
          #4

          @Christian-Ehrlicher, thanks

          1 Reply Last reply
          0
          • artwawA artwaw

            On top of that I think VLC asks for Qt5 while you're using Qt6?

            VitallllV Offline
            VitallllV Offline
            Vitallll
            wrote on last edited by
            #5

            @artwaw, I don't understand why I get these 2 errors with undefined refs.

            1 Reply Last reply
            0
            • artwawA artwaw

              On top of that I think VLC asks for Qt5 while you're using Qt6?

              Christian EhrlicherC Offline
              Christian EhrlicherC Offline
              Christian Ehrlicher
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @artwaw I missed this 🙂
              Yes, you can not mix Qt5 and Qt6

              Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
              Visit the Qt Academy at https://academy.qt.io/catalog

              VitallllV 1 Reply Last reply
              0
              • Christian EhrlicherC Christian Ehrlicher

                @artwaw I missed this 🙂
                Yes, you can not mix Qt5 and Qt6

                VitallllV Offline
                VitallllV Offline
                Vitallll
                wrote on last edited by
                #7

                @Christian-Ehrlicher is it real use Vlc and Qt 6?

                1 Reply Last reply
                0
                • artwawA Offline
                  artwawA Offline
                  artwaw
                  wrote on last edited by artwaw
                  #8

                  As stated on download page: All SDKs are based on Qt 5.6.1 and VLC 2.2.4.

                  So you can:

                  • revert to qt 5;
                  • contact the VLC the creator and ask about their plans to port to Qt6;
                  • take a source code of QtVLC and try to port it yourself.

                  Me myself I'd rather try to use libvlcpp and try to mix it with Qt Multimedia myself. QtVLC is really dated, considering the current Qt5 version.

                  For more information please re-read.

                  Kind Regards,
                  Artur

                  VitallllV 1 Reply Last reply
                  0
                  • artwawA artwaw

                    As stated on download page: All SDKs are based on Qt 5.6.1 and VLC 2.2.4.

                    So you can:

                    • revert to qt 5;
                    • contact the VLC the creator and ask about their plans to port to Qt6;
                    • take a source code of QtVLC and try to port it yourself.

                    Me myself I'd rather try to use libvlcpp and try to mix it with Qt Multimedia myself. QtVLC is really dated, considering the current Qt5 version.

                    VitallllV Offline
                    VitallllV Offline
                    Vitallll
                    wrote on last edited by
                    #9

                    @artwaw ok, thank you, have a nice day!

                    1 Reply Last reply
                    0
                    • VitallllV Vitallll has marked this topic as solved on
                    • artwawA Offline
                      artwawA Offline
                      artwaw
                      wrote on last edited by
                      #10

                      Good luck with the project!

                      For more information please re-read.

                      Kind Regards,
                      Artur

                      1 Reply Last reply
                      0

                      • Login

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