我使用的是Windows 10(64位),我从http://libre.adacore.com/download/configurations#下载了GNAT GPL 2017,ARM ELF格式(托管在Windows上)。如何运行Ada中编写的程序?
我创建了一个示例代码:
with Ada.Text_IO; use Ada.Text_IO;
procedure Hello is
begin
Put_Line("Hello from GPS!");
end Hello;
当我建立我的文件,一切都很好,并取得成功。问题是,当我运行我的程序,然后得到一个错误:当我改变我的项目的性质
Error while trying to execute C:\Users\sigger\Desktop\ada\hello: not an executable
:
Project -> Properties -> Sources -> Main -> Executable names
上用hello.exe,然后我得到一个错误,那我的程序无法在Windows 64位上运行。
如何在Windows 10上从我的ada代码创建一个exe文件?
你说得对。我不明白为什么,但32位版本在64位上运行正常。谢谢你的帮助。 – Sigger
简单的原因,向后兼容性,你只能使用64位中的32位。每个32位可执行文件将在Windows上运行64位。 (阅读https://www.techsupportalert.com/content/32-bit-and-64-bit-explained.htm) –