In the specific case of MySQL, you would look in the
MySQL Reference Manual in the
Connectors and API section which shows example code and details the required header file for compiling and librar[y|ies] for linking.
In other cases, the manual page for a given function will include librar[y|ies) to be included; e.g., if you were to use the
atan() function, the manual page for that function includes
Quote:
NAME
atan, atanf, atanl - arc tangent function
SYNOPSIS
#include <math.h>
double atan(double x);
float atanf(float x);
long double atanl( long double x);
Link with -lm.
|
Hope this helps some.