The MASM Forum

64 bit assembler => UASM Assembler Development => Topic started by: Vortex on May 17, 2021, 05:51:32 PM

Title: Import libraries for UASM
Post by: Vortex on May 17, 2021, 05:51:32 PM
Hello,

I think adding an option to the UASM package to create import libraries should be possible. What about creating 32-bit import libraries from module definition files? The .def file can be extracted from Pelles libraries or MS VC.  64-bit libraries can be created from DLLs since they are not decorated.
Title: Re: Import libraries for UASM
Post by: TouEnMasm on May 17, 2021, 11:03:10 PM

For what need ?
Title: Re: Import libraries for UASM
Post by: Vortex on May 17, 2021, 11:15:50 PM
Easy. The Masm32 and Asmc packages are providing their own import library sets. UASM could provide the same system.

A quick example, here is how to extract the def files from import libraries and regenerating them :

The DOS batch file creating the .def files :

Code: [Select]
For %%a IN (\PellesC\lib\Win\*.lib) Do @( \PellesC\bin\Polib.exe /MACHINE:x86 /MAKEDEF:%%~na.def %%~fa  )
The batch file creating the import libraries :

Code: [Select]
For %%a IN (*.def) Do @( \PellesC\bin\Polib.exe /MACHINE:x86 /DEF:%%a /OUT:%%~na.lib )
Adding the .def files and the necessary batch files to the UASM package would do the job.
Title: Re: Import libraries for UASM
Post by: fearless on May 20, 2021, 08:57:18 PM
I forgot that I created this, which might be useful: https://github.com/mrfearless/Dll2Def (https://github.com/mrfearless/Dll2Def). Could include that with any distribution and run a batch file with commands to create the .def files then convert the .def to .lib

Dll2Def supports * wildcard. I think i coded it to support x64 dll's as well.