Page 1 of 1

libvlc_new UNDEFINED in Visual Studio

Posted: 04 Jun 2016 01:11
by dreadLocks
Hello,

I just started using VLC in Visual Studio C++ 2014

But i'm getting an undefined error, here is a section of my C++ code....

#include "stdafx.h"
#include "Lock.h"
#include "LockDlg.h"
#include "afxdialogex.h"
#include "stdint.h"
#include "vlc\vlc.h"
#include "vlc\libvlc.h"
#include "vlc\libvlc_media.h"
#include "vlc\libvlc_media_player.h"

BOOL CLockDlg::OnInitDialog()
{
CDialogEx::OnInitDialog();

libvlc_instance_t * instance = libvlc_new(0, NULL);
.....

When i compile i get this link error....

1>LockDlg.obj : error LNK2019: unresolved external symbol _libvlc_new referenced in function "protected: virtual int __thiscall CLockDlg::OnInitDialog(void)" (?OnInitDialog@CLockDlg@@MAEHXZ)
1>D:\test\LockPlayer.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 1 up-to-date, 0 skipped ==========

I added these libraries to the project

libvlc.lib;
libvlccore.lib;

I dumped the functions in libvlc.lib using dumpbin to see if libvlc_new was in there, yes and all the APIs are there, the linker is not seeing it for some reason.

I'm using the 32-bit version of VLC 3.0.0 from the nightly builds because i need some of the new API.

The project says its an x86 project, im assuming that means its 32 bit so it should match with the 32 bit VLC, and im using the 32 bit debug version of the vlc sdk from nightly builds.

Does anybody have an idea why im getting this link error?

Thanks

Re: libvlc_new UNDEFINED in Visual Studio

Posted: 28 Jun 2016 10:17
by Jean-Baptiste Kempf
You're not telling VS to link with libvlc.lib