# Libraries

To use library you need to have a library available on your computer. That's complicated. Most of the time you don't need libraries. One library you can use to optimize (i.e. find the global optimum of) functions is NLopt.

To compile with a library named mylibrary, use

```
gfortran myprogram.f90 -lmylibrary
```

Note the `-l` before the name of the library (where `l`is lower case of **L** and stands for library).

The compiler must know where to find the library.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://antoinearnoud.gitbook.io/fortran/chapter6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
