문제

nasm has a bug on Windows (at least, possibly other platforms) which requires include paths to have trailing slashes. waf strips trailing slashes on paths by design. Bug report.

Obviously this causes a problem; asm files can't source include files. The elegant solution would be to fix nasm, however, given this bug exists in the public distribution of nasm and the bug is unassigned, this will be untenable for most.

The other option is to make waf tolerant of this bug.

도움이 되었습니까?

해결책

This hack re-adds the trailing slashes in the include path list for all asm tasks after they've been stripped.

Simply add the following code to the top level wscript:

import os

from waflib import TaskGen

@TaskGen.feature("asm")
@TaskGen.after_method("apply_incpaths")
def add_includes_paths(self):
    self.env.INCPATHS = [os.path.join(x, "") for x in self.env.INCPATHS]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top