[XviD-devel] NASM errors when compiling under Windows

Cort Danger Stratton cort at club.cc.cmu.edu
Tue Dec 16 01:14:33 CET 2008


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


More information about the Xvid-devel mailing list