Using libVLC in Visual C++ 2008

This forum is about all development around libVLC.
FS-Phil
New Cone
New Cone
Posts: 2
Joined: 10 Oct 2011 09:19

Using libVLC in Visual C++ 2008

Postby FS-Phil » 10 Oct 2011 09:45

Hi all,
unfortunatelly, I'm bad in English so may be I haven't understood some pieces of information from VideoLAN wiki. More that, I sure that somewhere in this forum there is a topic about my problem, but I can't find it. Finally, I don't know if I'm writing to correct thread :(

Back to my problem:
I've read information at http://wiki.videolan.org/LibVLC_Visual_C . I realized that I have to copy libvlc.dll, libvlccore.dll and Plugins folder to my Debug directory. So I copied all *.dll files that I've found in VLC directory, including libvlc.dll, libvlccore.dll and Plugins folder. Then I've created console project in my Visual Microsoft C++ 2008 Express and copied the code of vlc.h and testvlcconsole.cpp. After running this project I've seen that method loadLibrary(libreria) had returned that libvlc.dll hadn't loaded. But that isn't a problem - I've solved it by adding those *.dll files and Plugins folder to the directory where testvlcconsole.cpp is. After that libvlc.dll was included successfully but in method int initLib(LPWSTR libreria) the first if-clause
if ((VLC_AddIntf = (_VLC_ADDINTF) GetProcAddress(libvlc, "VLC_AddIntf")) == NULL)
return funcionFalla("VLC_AddIntf");
returned FUNCTIONFALLA. I do not know what I should do to solve this problem. I tried to google "La funcion VLC_AddIntf no pudo inicializarse" but all that I've got was VideoLAN wiki page where I can't found any more information except the code I've copied :(

Sorry for my English
Phil

devildrey33
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Dec 2010 17:06
Operating System: Windows & Linux
Location: Spain

Re: Using libVLC in Visual C++ 2008

Postby devildrey33 » 12 Oct 2011 07:05

Hi, in the second line of LibVLC_Visual_C wiki i see this line "***DEPRECATED API*** USE NEW libvlc_ prefixed functions". You need find the function "libvlc_AddIntf" not "VLC_AddIntf", but i dont remember if these function really exists :/

Anyway, i use visual studio with libvlc without using LoadLibrary and GetProcAddress. See this page to create libvlc.lib and avoid LoadLibrary stuff : http://wiki.videolan.org/GenerateLibFromDll

Sorry for my poor english and good luck.
http://www.devildrey33.es

FS-Phil
New Cone
New Cone
Posts: 2
Joined: 10 Oct 2011 09:19

Re: Using libVLC in Visual C++ 2008

Postby FS-Phil » 12 Oct 2011 07:47

Thank you devildrey33, I'll try to change function name to liblvc_AddIntf and I hope it would help :) . Anyway, I've tried to use .lib in my project and it hadn't help me.

UPDATE: after changing all function names and local defines to libvlc_* instead of VLC_* program running hadn't been changed :(

devildrey33
Blank Cone
Blank Cone
Posts: 11
Joined: 07 Dec 2010 17:06
Operating System: Windows & Linux
Location: Spain

Re: Using libVLC in Visual C++ 2008

Postby devildrey33 » 12 Oct 2011 16:16

Put all functions in minus "libvlc_add_intf". All libVLC functions come in minus, if you encounter more problems, maybe you have a path problem loading "libvlc.dll" with LoadLibrary... ensure LoadLibrary returns a valid handle.

What problem have you with "lib" creation / implementation? its more easy and need less work than use LoadLibrary stuff, because you can use libvlc headers.
http://www.devildrey33.es


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 13 guests