The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Farabi on August 22, 2007, 09:33:58 AM

Title: Making a lib file?
Post by: Farabi on August 22, 2007, 09:33:58 AM
How to made our function put on a lib file?
Title: Re: Making a lib file?
Post by: P1 on August 22, 2007, 01:31:09 PM
In the standard distribution of MASM32, is a directory of m32lib, which contains all the source ( and batch files ) for creating the MASM32 library of standard function routines.

Enjoy  :U

Regards,  P1   :8)
Title: Re: Making a lib file?
Post by: Farabi on August 25, 2007, 06:30:55 AM
So if I made my own function and I want to made it as a lib file what I need to do is modifying the masm32 standard function lib and spread it to my friend? Am I right?
Title: Re: Making a lib file?
Post by: Vortex on August 25, 2007, 07:25:47 AM
Hi Farabi,

Creating a static library is easy. First, choose your source files to be assembled and then use MS' librarian lib.exe to build your static library from the object files :

\masm32\bin\ml /c /coff *.asm
\masm32\bin\lib /OUT:testlib.lib *.obj

[attachment deleted by admin]
Title: Re: Making a lib file?
Post by: hutch-- on August 25, 2007, 07:49:46 AM
Farabi,

The masm32 project is geared for making library modules. Just check the menus to run a bare template to get a basic library module. Write your procedure in the module, make sure it works properly then convert it to a library using the command line that rol has shown you. The MASM32 library is an EXAMPLE of how to make a library in MASM.