Re: Usage of gengetopt
"J. David Bryan" <[email protected]> Sat, 18 Sep 2010 18:51:53 -0400
| Newsgroups | gmane.comp.gnu.gengetopt.general |
|---|---|
| Message-ID | <[email protected]> |
Lorenzo,
On Wednesday, September 15, 2010 at 11:05, Lorenzo Bettini wrote:
> David, do you have some documentation for compilation under windows that
> I might add to the gengetopt documentation?
Using the MinGW/MSYS environment on Windows, installation is the same as is
listed in the manual:
cd <source code main directory>
./configure
make
make install
The only suggestion I would add would be to use:
make LDFLAGS="-s -all-static"
...instead, so that the resulting executable is (a) stripped of debugging
symbols, and (b) self-contained. Without "-s", about 5 MB of debugging
symbols are added, and without "-all-static", the executable uses the
shared (DLL) versions of the gcc and g++ libraries. These dependencies may
or may not be desirable, depending on the user's preference.
To set up the MinGW/MSYS environment, one would go to:
http://sourceforge.net/projects/mingw/files/
...and download "mingw-get-inst-<date>.exe" (the installer). Then one
would run this program and select the following components to install:
- C compiler (this is selected by default)
- C++ compiler
- MSYS basic system
After installation is complete, selecting the "MinGW Shell" on the Windows
start menu runs bash, and then the generic installation instructions above
may be followed.
-- Dave