Ada static compilation

  ada, compilation, gnat, static, windows

I have compiled a simple Ada application which uses the Win32Ada library.

I’m compiling the application on Windows using:

gnatmake C:GNAT20binsrcmain.adb -I"C:GNAT20libwin32ada" -largs -lwin32ada.

The application works as expected on the compilation machine and when executing main.exe a MessageBox is executed.

However, when attempting to execute the application on another Windows system which doesn’t have the Ada libraries installed, I received an error:

The code execution cannot processed because libwin32ada.dll was not found

Does Ada support static compilation?

Can I compile the application so main.exe can execute on any Windows host without needing to bundle DLL‘s?

I couldn’t find an answer in the gnatmake --help (but I’m also new to Ada).

Source: Windows Questions

LEAVE A COMMENT