standard libraries
Home

 

Fortran does not have the concept of "standard libraries, since things like sin, log, and print, are all part of the infrastructure.  The C concept is to not get between the programmer and the machine, so that nothing "goes on behind the curtains.   As part of this philosophy, there are no build in scientific functions, or interfaces between the program and the operating system.  One is free to write their own print routines, or (essentially always) use standard libraries that are part of ISO C.  

If you want to use a standard library there will certainly be one step, and perhaps two, that need to be done first.   The first step that must certainly be done is to include the header file for the standard library.  Examples are math.h or stdio.h.   The libraries use most often are listed below.  Important:  This only defines the use of the libraries' functions.  It does not necessarily also tell the linker how to find the executable for the libraries.  Usually default libraries are set up, but in some cases (HP and GNU are examples) you must tell the machine where to find them.  (C is much closer to the machine than Fortran!)  In this case you need to add an option something like -lmath to tell it which library to link into.