This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Using dlltool to create a .lib for MSVC


Hi all,

I have successfully created a windows DLL using the MinGW Linux to 
windows cross compiler tool chain. I have also created a binary that
uses the DLL and it works correctly when run on a windows machine.

However, I have windows users who would like to use my DLL from
programs created using the Microsofts's Visual Studio compiler.
For this they need a file with a .lib extension.

I know this .lib file can be generated using the program lib.exe
which comes with VS and that works fine. However, I also thought it
was possible to use dlltool program from binutils to do the same
thing by doing something like:

    i586-mingw32msvc-dlltool --dllname $dllname --def $defname --output-lib $libname

The lib file created like this seems to be the right file type
(hex dump comparison of this file compared to one generated by
MS's lib.exe), but VS doesn't seem to like it.

Does any one know why? Can this be fixed?

Cheers,
Erik
-- 
-----------------------------------------------------------------
Erik de Castro Lopo
-----------------------------------------------------------------
Never argue with stupid people. They'll just drag you down to
their level and beat you with experience


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]