News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Batch File - Building a Library

Started by dedndave, January 25, 2014, 10:02:50 PM

Previous topic - Next topic

dedndave

i recently found an issue with MASM...

i created a response file with DIR/B, then assembled from the response file
dir/b *.asm>.\Resp.txt
ml /c /coff /nologo @Resp.txt >..\LibErr.txt

MASM is prone to errors - even crashed once

so, i wrote a FOR loop, instead
for %%f in (.\*.asm) do ml /c /coff /nologo %%f >>..\LibErr.txt
works every time   :P

nidud

#1
deleted

dedndave

if that works, it's probably more-or-less the same as using a response file   :P

nidud

#3
deleted

jj2007

Long file names as such are probably OK, but missing quotes around filenames with spaces are a problem. Check the response file for spaces, try to put quotes around these, and see if ML still chokes.

dedndave

the response file is not the problem
the problem seems to be that MASM doesn't fully "reset" between modules
by using a FOR loop, each module gets a fresh instance of MASM execution

jj2007

Strange. I always build MasmBasic using a response file, it never chokes with ML 6.15 .. 10 or JWasm.

dedndave

it generally works ok
but if any modules have errors, you may be in for a bumpy ride
that tells me that it's less than ideal, even if the modules have no errors

another place a response file is used is during installation of the Masm32 package
it seems to be a processor-intensive operation, and has even been problematic in some cases
perhaps the FOR loop method would relieve some of those issues

jj2007

#8
Quote from: dedndave on January 26, 2014, 04:43:57 AM
but if any modules have errors, you may be in for a bumpy ride
Well, kind of... I do have errors sometimes, and one problem is that errorlevel doesn't work, so you have to detect it with different methods (i.e. checking the output):
   \Masm32\bin\%oAssembler% /c /coff @libtmpXY.rsp
   if errorlevel 0 goto okml


What I find definitely annoying is that even when there is an error in the first source, ML continues to assemble all my 26 source files - and it's so slow...
No way to make it exit, even with Dave's for loop it just continues... :(

Vortex

If you are working in the MSYS environment :


for f in *.asm
   do
         /d/masm32/bin/ml.exe /ID:\masm32/include //c //coff $f
   done


http://www.mingw.org/wiki/MSYS