VLC-Qt build error
-
Hi, I am trying to test out on VLC with QT to build a video player.
Some info on what software I am using:
QT 6.6
compiling with QT qmake, msvc2019_64
Had Installed VLCI am following the guideline in this website
http://derekmolloy.ie/custom-video-streaming-player-using-libvlc-and-qt/I had downloaded this [simple-player] example from
https://github.com/vlc-qt/examplesBut when i open the example above in QT and try to build it
I encountered this 2 errors, can anyone advise how to resolve?
its highlighting the VlcCommon and VlcInstance classesmainwindow.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 "public: __cdecl MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QEAA@PEAVQWidget@@@Z)
mainwindow.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 "public: __cdecl MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QEAA@PEAVQWidget@@@Z)
-
@NewUser2023 Looks like VLC-Qt lib is not linked. Check the build output to see whether linker complains about not found libraries. Did you build VLC-Qt lib?
-
Thanks for your response
I am new to C++, may I know what do you mean by build the VLC-QT?
I didn't build or convert the VLC-QT lib files i downloaded from
https://vlc-qt.tano.si/ -> https://github.com/vlc-qt/vlc-qt/releases/download/1.1.0/VLC-Qt_1.1.0_win64_msvc2015.7zI saw there is VLCQtCore.dll and VLCQtCore.lib inside the VLC-QT lib folders, can I assume don't need to build?
Thanks
-
@NewUser2023 OK, you're using prebuild VLC-Qt, that's fine.
How do you build the example? Using CMake or QMake? How do you call CMake or QMake? How does their output look like? -
@jsulm said in VLC-Qt build error:
Hi
I am using qmake, build using QT-Creator, i was trying to build a "release" version of it
here is how the release folder look like, do i need to paste the missing lib /dll here?
When i create my project, i selected this MSVC2019 64 bit kit
here is my workspace structure, the library I downloaded, i just extract and place them here
inside the lib folder, there is the lib files , VLCQtCore.lib etc...
inside the include folder, there is the header files , VideoDelegate.h etc
inside the bin folder, there is the dll files, VLCQtCore.dll etcis there any step which i missed to "import" the library?
-
Hi
just to add on
I also downloaded the LibVLC from here [VLC source code tar.xz ]
https://www.videolan.org/vlc/download-sources.htmlAnd I copied out these folder to be place in my QT installation dir
inside the include, plugin and lib folder
QT installation dir
-
@NewUser2023 said in VLC-Qt build error:
And I copied out these folder to be place in my QT installation dir
This is not a good idea.
You just need to define in your pro file where to find VLC-Qt libs and headers.
See https://doc.qt.io/qt-6/qmake-variable-reference.html#libs and https://doc.qt.io/qt-6/qmake-variable-reference.html#includepath -
@NewUser2023 Please post text not pictures.
In your LIBS you use PWD - make sure the path is really valid and check the linker call to see what paths are passed to the linker.