<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ColonelK</id>
	<title>VideoLAN Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.videolan.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=ColonelK"/>
	<link rel="alternate" type="text/html" href="https://wiki.videolan.org/Special:Contributions/ColonelK/"/>
	<updated>2026-11-04T18:38:31Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.videolan.org/index.php?title=GenerateLibFromDll&amp;diff=18930</id>
		<title>GenerateLibFromDll</title>
		<link rel="alternate" type="text/html" href="https://wiki.videolan.org/index.php?title=GenerateLibFromDll&amp;diff=18930"/>
		<updated>2011-03-26T00:38:40Z</updated>

		<summary type="html">&lt;p&gt;ColonelK: Suggested an automatic method to generate the DEF file&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;from: [http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/ http://www.coderetard.com/2009/01/21/generate-a-lib-from-a-dll-with-visual-studio/]&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
To avoid installing and fighting against MSYS and Cygwin, you can just extract&lt;br /&gt;
exported symbols from libvlc.dll to generate a .lib (libvlc.lib) and link your program against it.&lt;br /&gt;
And all of this using only with Microsoft Visual Studio Tools!&lt;br /&gt;
&lt;br /&gt;
In case you don&#039;t have Visual Studio you can download the free version here [http://www.microsoft.com/express/download Visual Studio Express].&lt;br /&gt;
&lt;br /&gt;
== Open a Command Prompt ==&lt;br /&gt;
&lt;br /&gt;
It can be found within the Visual Studio Tools menu entry: Start / Program Files / Microsoft Visual Studio / Visual Studio Tools / Visual Studio Command Prompt.&lt;br /&gt;
&lt;br /&gt;
== Extract Symbols  ==&lt;br /&gt;
&lt;br /&gt;
Within the command prompt type: &lt;br /&gt;
&lt;br /&gt;
 dumpbin /exports &amp;quot;C:\Program Files\VideoLAN\VLC\libvlc.dll&amp;quot; &amp;amp;gt; &amp;quot;C:\Program Files\VideoLAN\VLC\libvlc.def&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Edit the libvlc.def file and modify it to get something like this: &lt;br /&gt;
&lt;br /&gt;
 EXPORTS&lt;br /&gt;
 libvlc_add_intf&lt;br /&gt;
 libvlc_audio_get_channel&lt;br /&gt;
 libvlc_audio_get_mute&lt;br /&gt;
 libvlc_audio_get_track&lt;br /&gt;
 libvlc_audio_get_track_count&lt;br /&gt;
 libvlc_audio_get_track_description&lt;br /&gt;
 libvlc_audio_get_volume&lt;br /&gt;
 ...&lt;br /&gt;
&lt;br /&gt;
Alternatively, the following command will automatically generate the DEF file:&lt;br /&gt;
&lt;br /&gt;
 echo EXPORTS &amp;gt; libvlc.def&lt;br /&gt;
 for /f &amp;quot;usebackq tokens=4,* delims=_ &amp;quot; %i in (`dumpbin /exports &amp;quot;c:\Program Files\VideoLan\VLC\libvlc.dll&amp;quot;`) do if %i==libvlc echo %i_%j &amp;gt;&amp;gt; libvlc.def&lt;br /&gt;
&lt;br /&gt;
== Generate the .lib ==&lt;br /&gt;
&lt;br /&gt;
Still within the command prompt type:&lt;br /&gt;
&lt;br /&gt;
 lib /def:&amp;quot;C:\Program Files\VideoLAN\VLC\libvlc.def&amp;quot; /out:&amp;quot;C:\Program Files\VideoLAN\VLC\libvlc.lib&amp;quot; /machine:x86&lt;br /&gt;
&lt;br /&gt;
Of course, you&#039;ll need to adapt the path according to your configuration.&lt;br /&gt;
&lt;br /&gt;
Et voila! You have it, now you can link against libvlc.lib in your program &amp;lt;nowiki&amp;gt;:-)&amp;lt;/nowiki&amp;gt;&lt;/div&gt;</summary>
		<author><name>ColonelK</name></author>
	</entry>
</feed>