Getting unresolved external symbol error though I placed dll

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
kokila
New Cone
New Cone
Posts: 2
Joined: 04 Oct 2014 03:36

Getting unresolved external symbol error though I placed dll

Postby kokila » 06 Oct 2014 02:48

I am using QT 5.3 version. My compiler is msvc2013opengl. Downloaded VLC 2.1

I have used the following url to create a player using VLC.
https://wiki.videolan.org/LibVLC_Tutorial_086c/


I get the following errors.
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_new referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_release referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_media_new_path referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_media_player_new_from_media referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_media_player_release referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_media_player_play referenced in function _main
main.obj:-1: error: LNK2019: unresolved external symbol _libvlc_media_player_stop referenced in function _main
debug\TestVLC.exe:-1: error: LNK1120: 7 unresolved externals

My main.cpp

#include "vplayer.h"
#include <QtCore/QCoreApplication>
#include <QtCore/QTextCodec>
#include <QApplication>
int main(int argc, char *argv[])
{
QCoreApplication::setApplicationName("test");
QTextCodec::setCodecForLocale(QTextCodec::codecForName("UTF-8"));
QApplication a(argc, argv);
vPlayer w;
w.show();

return a.exec();
}

My .pro file
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = TestVLC
TEMPLATE = app
SOURCES += main.cpp\
vlc_on_qt.cpp
HEADERS += vlc_on_qt.h
FORMS += vlc_on_qt.ui
LIBS += -LC:/Qt/libvlc-qt/lib -llibvlc
LIBS += -LC:/Qt/libvlc-qt/lib -llibvlccore
LIBS += -LC:/Qt/libvlc-qt/lib -lvlc-qt
LIBS += -LC:/Qt/libvlc-qt/lib -lvlc-qt-widgets
INCLUDEPATH += C:/Qt/libvlc-qt/include

I have copied .h files from VLC folder to C:\Qt\libvlc-qt\include
I have copied .dll,.lib,plugins from VLC source code to my application's build folder under debug which is
C:\Qt\Qt5.3.1\Tools\QtCreator\bin\build-TestVLC-Desktop_Qt_5_3_MSVC2013_OpenGL_32bit-Debug\debug

pkgconfig (contains libvlc.pc,vlc-plugin.pc)
plugins (copied from vlc folder)
axvlc.dll
libvlc.dll
libvlc.dll.a
libvlc.a
libvlc.lib
libvlccore.dll
libvlccore.dll.a
libvlccore.la
libvlccore.lib
npvlc.dll
vlc-qt.dll
vlc-qt.lib
vlc-qt-widgets.dll
vlc-qt=widgets.lib

I have added path variables under controlpanel->systemsecurity->advanced system settings->environment variables
C:\Qt\Qt5.3.1\5.3\msvc2013_opengl\bin ( I am not sure whether it is correct)

My projects resides under C:\Qt\Qt5.3.1\Tools\QtCreator\bin. Though I changed the path, the result is the same.

Please help me. What else I have to do

Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 105 guests