我使用的是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) –