From: Alistair Thomas Date: Tue, 20 Dec 2022 19:38:17 +0000 (+0000) Subject: vapi: Add documentation to GLib.Math that '-X -lm' may be needed when compiling X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=f2d55c270c3bef8521d199fda8c2772571e0f82e;p=thirdparty%2Fvala.git vapi: Add documentation to GLib.Math that '-X -lm' may be needed when compiling See https://gitlab.gnome.org/GNOME/vala/issues/1388 --- diff --git a/vapi/glib-2.0.vapi b/vapi/glib-2.0.vapi index 28665980a..77675b67d 100644 --- a/vapi/glib-2.0.vapi +++ b/vapi/glib-2.0.vapi @@ -1641,6 +1641,16 @@ namespace GLib { public struct pointer { } + /** + * Binding to the C standard library's maths functions + * + * When compiling binary output with ``valac`` and some ``libc`` + * implementations, such as GNU's ``libc``, you will need to pass through + * the math library linker flags, ``-lm``, if a function is not found. + * For example: + * + * {{{valac -X -lm my_maths_program.vala}}} + */ [CCode (lower_case_cprefix = "", cheader_filename = "math.h")] namespace Math { [CCode (cname = "G_E", cheader_filename = "glib.h")]