Creating a .lib from the .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.
Kleus
New Cone
New Cone
Posts: 2
Joined: 14 Nov 2006 12:03
Location: Netherlands

Creating a .lib from the .dll

Postby Kleus » 14 Nov 2006 12:14

Hello,

I've got a little question.
For school we're working with VLC, and we're trying to implement the VLC dll file into our own Borland C++ program. The problem is: it isn't prossible to link a .dll directly too your project, so we have to make a .lib for the .dll. With the .lib it should be possible to link to the .dll.

We've already tried to build a .lib from the .dll using the program "DLL to Lib". But the created .lib file still gives trouble in Borland. Do you guys have any idea how to create a working .lib file?

We're using the latest VLC package, named vlc-0.8.5-win32.zip and the libvlc.dll that came with it.

I hope someone can help us, so we can use the library...

Greetings,

Bas

VLC_help
Mega Cone Master
Mega Cone Master
Posts: 25661
Joined: 13 Sep 2006 14:16

Postby VLC_help » 14 Nov 2006 17:11

You should try devs IRC channel.
* IRC network: irc.videolan.org
* Channel: #videolan

Rémi Denis-Courmont
Developer
Developer
Posts: 15265
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Postby Rémi Denis-Courmont » 14 Nov 2006 21:49

I am not sure if the DLL is really useable with anything except code built with the same compiler. I suspect we don't use the same calling convention as Borland C++. Even if we do, you would still need the C header files which are very unlikely to work properly on anything but GCC.

I would strongly advise you use the ActiveX plugin instead. This one should be easy to link with.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

Odysee
Blank Cone
Blank Cone
Posts: 15
Joined: 25 Oct 2006 17:18
Location: Germany

Postby Odysee » 15 Nov 2006 08:03

Or use the WinAPI with LoadLibrary an GetProcArddress.
I have tried this, and it works fine in VS2005 (C++ and c#).

You must only copy some structs from the oriiginal headers !

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Try Dumpbin

Postby Tappen » 15 Nov 2006 19:35

You can use dumpbin.exe /exports on libvlc.dll to get the functions that are exported and build your own .def file with the ordinals of the functions you want to import. Ignore all the functions that begin with an underscore: they're c++ mangled names that won't work from Borland C++. The other functions should be Pascal calling convention and if you look in the source code you'll be able to write good header files for them.

Kleus
New Cone
New Cone
Posts: 2
Joined: 14 Nov 2006 12:03
Location: Netherlands

Postby Kleus » 16 Nov 2006 14:02

Thanks for all your options.

We've already tried the ActiveX component, but it isn't working in Borland. It isn't possible then to create a VCLPlugin class, cause it's abstract or something.... Do we have to make an class which inherits from the VCLPlugin?

Right now we're trying to compile some stuff using Cygwin.
And besides all this we're trying all the options by using Visual Studio 2005....

Hope it will work, eventually

Bas

loic69
Blank Cone
Blank Cone
Posts: 37
Joined: 31 Jan 2007 18:10
Location: France

Postby loic69 » 04 May 2007 22:01

Hi some news of Visual Studio ?


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 22 guests