Compiling the Library


Every attempt has been made to write platform-independent code which conforms to the ISO (ISO/IEC 14882:1998) standard for the C++ programming language. The routines have been tested under the following compilers:

  • Microsoft Visual C++ 2008 (for Windows)

    The recommended method for compiling SCATMECH under Visual C++ is to use the Visual Studio integrated development environment to create a static library:
     
    • Create a Win32 static library project (call it scatmech.lib).
    • Add all of the *.cpp and *.h files in the SCATMECH code directory to the project
    • Be sure that exception handling is enabled.
    • Build the library.

    For each example program:
     
    • Create a separate Win32 console application project.
    • Add the source code (e.g., BRDFProg.cpp) for the example.
    • Add the SCATMECH code directory to the list of include directories.
    • Add the static library (scatmech.lib) to the project.
    • Build the program.

  • GNU Project C++ Versions 4.1.2 (for Linux)
    Makefile: Makefile

  • GNU Project C++ Version 4.8.2 (for Cygwin on Windows)
    Makefile: Makefile

Note: Certain commercial products are identified in this documentation in order to describe the software adequately. Such identification is not intended to imply recommendation or endorsement by the National Institute of Standards and Technology, nor is it intended to imply that the products are necessarily the best available for the purpose.

It is recommended that all of the files (with the exception of BRDFProg.cpp, RCWProg.cpp, ReflectProg.cpp, and MieProg.cpp, which define different mains) be compiled and archived into a single library. Programs written to use the SCATMECH library can then be compiled separately and linked with the library.

The SCATMECH library uses the Standard Template Library versions of most standard library functions and classes. All programs using the SCATMECH library should either include the statement using namespace std; in the code or use explicit names (e.g.,std::complex or std::cout).

For external projects, the include path must include the code directory of the library.

Return to top


For More Information

SCATMECH Technical Information and Questions
Sensor Science Division Home Page
Sensor Science Division Inquiries
Website Comments

Current SCATMECH version: 7.22 (April 2021)