Installing Visual C++ | Home VC++ Overview Installing VC++ Installing getopt Registering VC++ Verifying Installation | Registering Visual C++ |
Getopt.h is a header in the GNU standard library that contains utilities for extracting arguments from the command line for text-based C/C++ applications. Because getopt.h is not part of the ANSI C standard library, getopt must be built into each project that uses it, or compiled it into a static library and linked to explicitly. A precompiled version of getopt is available, so you will be copying the .h and the .lib files to your computer, then adding these directories to the VC++ search paths so that getopt can be used as if it were part of the standard library.
Note: Every homework project is configured to explicitly pass getoptd.lib to the linker. If you need to create your own project instead of using the pre-configured ones, make sure that you specify getoptd.lib as an input to the linker.
Note for users upgrading from VC++ 2005: If you uninstalled VC++ 2005, you will need to download getopt9, which was built with VC++ 2008. The version of getopt offered fall 07, which is now called getopt8, was built with VC++ 2005 and linked to version 8 of the Microsoft CRT (C Run-Time). If you try running an application that depends on version 8 of the crt without the necessary dlls (msvcr80.dll and msvcr80d.dll), the application will fail to start and you will get a "side by side configuration error." If you receive this message after linking to getopt8 from VC++ 2008, there are several possible solutions:
Installing Visual C++ | Home VC++ Overview Installing VC++ Installing getopt Registering VC++ Verifying Installation | Registering Visual C++ |