NASM errors when compiling under Windows

Cort Danger Stratton <[email protected]>
Newsgroups gmane.comp.video.xvid.devel
Message-ID <[email protected]>
Hello,

Whenever I download a new xvidcore source archive and try to build it
under Windows, I invariably run into some NASM-related build errors ("no
input file provided", "more than one input file provided", that sort of
thing).  The problem seems to that certain Visual Studio path macros,
like $(InputDir), are being passed to NASM without quotes.  If the path
name contains spaces or other special characters, nasm interprets it as
multiple strings, and errors generally ensue.

I was able to fix the problems by replacing the Custom Build Step for
all *.asm files in the project with the following command:

    nasm -o "$(IntDir)\$(InputName).obj" -f win32 -DWINDOWS -I..\..\src\
        -I"$(InputDir)\" "$(InputPath)"

Note especially the trailing backslash after $(InputDir) on the second
line; if it is not present, and if $(InputDir) ends in a backslash
(which it most often does), Visual Studio seems to ignore the trailing
double-quote and confuse itself even further.

It would be great if this fix could make it into CVS; I'd be happy to do
it myself, if somebody could explain how that process works (I'm a new
subscriber; I don't know the rules yet).

Thanks!
 - cort
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.