开发者

Ada, how to package the Ada code to an independent exe file?

I am use GNAT Programming Studio 2011.

I want to know how package the code to an exe file. Such as package and release my code to a exe file and could开发者_如何学JAVA running in other computer which is not install the GPS2011.

Thanks! Sunny


You can add -static to the linker flags. Then all shared libraries will be put into the executable. But don't cry about the size then ;)


When you configured GPS for your project, you told it what to call, and where to place, your main program.

That file is your "exe" file (whether it's literally a ".exe" for Windows, or whatever you named it for other Unix-based environments) containing all your code.

If your program employs any shared libraries or supporting data or configuration files, the target machine will either have to have those already installed, or they'll need to be included as part of your installation package.

Since you have your "main" exe, this then simply becomes an installation packaging question. If you're working on Windows, there's a number of Installer utilities available, and for Linux there's various packaging options, like rpm's and deb's. And there's always the option of simply providing a (compressed) tar file of the execution directory hierarchy.


I prefer GNAT for development, but MinGW is a usable alternative for preparing .exe files.

Addendum: Note that MinGW derives from FSF GNAT, and the GNAT Modified General Public License would apply to the distribution of code compiled with MinGW. Before distributing code compiled with GNAT Programming Studio 2011, you should check the license that came with your copy. A related discussion may be found here.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜