错误LNK2001:未解析的外部程序集masm32

时间:2013-06-05 19:22:21

标签: assembly masm32

以下是代码段:

.386 
.model flat, stdcall 
    option casemap :none ; case sensitive 
.nolist 
include \masm32\include\windows.inc 
include \masm32\include\user32.inc 
include \masm32\include\kernel32.inc 
include \masm32\include\masm32.inc 
include \masm32\include\fpu.inc
.list 
includelib \masm32\lib\user32.lib 
includelib \masm32\lib\kernel32.lib 
includelib \masm32\lib\masm32.lib

.data
angulo_deg DW 270
coseno  DB 50 DUP(" "),0ah,0dh,0
sal1_1 DB "Medidas para el angulo 270 Grados",0
sal3 DB "Coseno: ",0
.code
Inicio:
    ; ANGULO DEG:
    fclex
    pushd 180   ;store the integer value of 180 on the stack
    fidiv dword ptr angulo_deg  ;divide the angle in degrees by 180
                                ;-> ST(0)=angle in degrees/180
    fldpi       ;load the hard-coded value of π
                ;-> ST(0)=π, ST(1)=angle in degrees/180
    fmul        ;-> ST(0)=angle in degrees*π/180, => angle in radians
    invoke FpuCos, 0,0, SRC1_FPU or ANG_DEG or DEST_FPU
    invoke FpuFLtoA, 0,4, ADDR coseno, SRC1_FPU or SRC2_DIMM
    invoke StdOut, ADDR coseno
    invoke ExitProcess,0
End Inicio

然后我用“ml / c / coff / Fl ejemplo1.asm”编译 并且它不会引发任何错误。 但当我链接:“链接/子系统:控制台ejemplo1” 它拖着:

  

ejemplo1.obj:错误LNK2001:未解析的外部符号_FputoA @ 16

     

ejemplo1.obj:错误LNK2001:未解析的外部符号_FpuCos @ 12

     

ejemplo1.exe:致命错误LNK1120:2个未解析的外部

我不知道问题是什么。希望您能够帮助我。非常感谢。

0 个答案:

没有答案