Question

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 running in other computer which is not install the GPS2011.

Thanks! Sunny

Was it helpful?

Solution

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 ;)

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top