Hi,

I'm running vc++ 6.0, 5.6.1, and nasm on Win 2k pro, with  version 0.03 of
Inline::ASM.

'make.out' (in the build directory) invariably complains that the functions
are 'unresolved external symbols', at which point, the process dies.

As an example, the following script (based on nasm-as.pl example) will
report '_subtract' as an unresolved external symbol.

Why is this ? and how might I fix the problem ?

######################
print "9 - 16 = ", subtract(9, 16), "\n";

use Inline ASM => 'DATA',
    AS => 'nasm',
    ASFLAGS => '-f win32',
    PROTO => {subtract=>'int(int,int)'};

__END__
__ASM__

global subtract

section .text

subtract: mov eax,[esp+4]
          sub eax,[esp+8]
          ret
#########################

Cheers,
Rob


Reply via email to