我是一个使用ada语言和GPS的初学者。我似乎找不到任何实用的教程来帮助我学习ada或GPS,但这不是我的问题。
我尝试了各种简单的程序,比如这个:
with Win32.crt.Math;
with Interfaces.C;
procedure sqrt is
X : Interfaces.C.Double;
begin
X := Win32.crt.Math.sqrt(x => 4.0) ;
end sqrt;
我尝试过其他类似简单的工具,也在网上找到了一些更复杂的工具,但只有一个工具可以使用。不管怎样,当我尝试构建时,出现了以下错误:
gnatmake -d -PC:\Users\bqw3960\Desktop\GPS2012\2-two\sqrt.gpr sqrt.adb
gnatbind -x sqrt.ali
gnatlink -o c:\users\bqw3960\desktop\gps2012\2-two\sqrt.exe sqrt.ali
C:\GNAT\Bindings\Win32Ada\win32-crt-math.o(.text+0x1a):win32-crt-math.adb: undefined
reference to `__imp__HUGE'
gnatlink: cannot call C:\GNAT\bin\gcc.exe
gnatmake: *** link failed.
[2013-06-13 10:53:18] process exited with status 4 (elapsed time: 00.51s)
我觉得这很简单,但我似乎想不出来。
有时候我第一次更改后尝试编译时也会遇到这个问题:
gcc.exe: unrecognized option `-ws'