Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert lib + header file to DLL

Tags:

c++

c

windows

dll

I have a library (lib file + .h header file). I like to turn it into a DLL so I can easiliy use it in VB6. Is there a convenient way to do this?

like image 836
Robbert Dam Avatar asked May 22 '09 08:05

Robbert Dam


People also ask

Does DLL include header files?

The DLL's . cpp files and internal header files can happily #include both public and internal header files, of course.

What is difference between DLL and header file?

H Declares the interface to a library - including functions, structures, and constants. Written in the C language. LIB Either declares the binary interface to a dynamic library (DLL) or contains the binary code of a library.

What is the difference between LIB and DLL?

LIB vs DLLLIB is a static library where functions and procedures can be placed and called as the application is being compiled. A DLL or Dynamic Link Library does the same function but is dynamic in a sense that the application can call these libraries during run-time and not during the compilation.


1 Answers

Simply include the header file an a .def file in a new dll project and link it with the static lib.

The details of how to export symbols with a def file are here http://msdn.microsoft.com/en-us/library/d91k01sh(VS.80).aspx

like image 198
iain Avatar answered Oct 13 '22 00:10

iain