how do you compile a *.asm file to a *.lib file?
I use this batch file to compile it to a dll:
-----CODE------
@echo off
echo press any key to compile
pause > nul
if exist N3xuiZ PE.obj del "the.obj"
if exist N3xuiZ PE.dll del "the.dll"
C:\masm32\bin\ml /c /coff "the.Asm"
C:\masm32\bin\Link /SUBSYSTEM:WINDOWS /DLL "the.obj"
echo compilation complete
echo press any key to comtinue
Pause > nul
-----CODE------
Thanks.
hi
use this
\masm32\bin\ml /c /coff test.asm
\masm32\bin\lib test.obj /out:test.lib
greets
ragdog
Thanks sooooooooooo much! :U
Hi!
this command : \masm32\bin\ml /c /coff test.asm , create an obj file, but this obj file is not valid for other project for using.
i want an object file (created of *.asm) that i add this file in other project (VC or Delphi). how do i create this object file?
\masm32\bin\polib /OUT:mylibrary.lib objfile1.obj objfile2.obj objfile3.obj
i created myFile.lib with this code:
\masm32\bin\ml /c /coff myFile.asm
\masm32\bin\lib myFile.obj /out:myFile.lib
in this code :
\masm32\bin\polib /OUT:myFile.lib objfile1.obj objfile2.obj objfile3.obj
what is objfile1.obj and objfile2.obj and objfile3.obj?
what do i do?
You can create a static library from multiple object modules not just only from one object file. If you have one file :
polib /OUT:myFile.lib myFile.obj
If you have more than one object module :
polib /OUT:myFile.lib myFile1.obj myFile2.obj etc.
oh, yes, ok. but my problem dos not resolve.
i want an object file from an asm file. AND this object file will be used in VC or Delphi projects
Delphi is using the OMF object module format :
\masm32\bin\ml /c sourcecode.asm ; this creates an OMF module
VC and Pelles C are using the MS COFF format :
\masm32\bin\ml /c /coff sourcecode.asm
Have a look at Elicz's OMF2D tool to convert OMF modules to Delphi type OMF modules :
http://www.apihooks.com/EliCZ/export.htm
thank you, very much.
i used OMF object that has been created by OMF2D, in delphi project. thanks.
\masm32\bin\ml /c sourcecode.asm
omf2d.exe sourcecode.obj
But... in VC project, ...
Hi zoncpp,
VC accepts regular MS COFF object modules so creating a static library should be OK for you.
thank you Vortex !
i used a static library in VC.
ok , i will endeavor a little and if i had not be success, then i will work with static library.