libvlc_new UNDEFINED in Visual Studio

This forum is about all development around libVLC.
dreadLocks
Blank Cone
Blank Cone
Posts: 18
Joined: 31 May 2016 23:39

libvlc_new UNDEFINED in Visual Studio

Postby dreadLocks » 04 Jun 2016 01:11

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

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: libvlc_new UNDEFINED in Visual Studio

Postby Jean-Baptiste Kempf » 28 Jun 2016 10:17

You're not telling VS to link with libvlc.lib
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 21 guests