]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
vapi: Add documentation to GLib.Math that '-X -lm' may be needed when compiling
authorAlistair Thomas <astavale@yahoo.co.uk>
Tue, 20 Dec 2022 19:38:17 +0000 (19:38 +0000)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 27 Jun 2023 19:06:50 +0000 (21:06 +0200)
See https://gitlab.gnome.org/GNOME/vala/issues/1388

vapi/glib-2.0.vapi

index 28665980a905f20211293e42204219f28362ed6a..77675b67de6dbd959f33ff5f822cea12148a3189 100644 (file)
@@ -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")]