From f14d13a6bf4199eb2a750b576e6bbeb14ec49e38 Mon Sep 17 00:00:00 2001 From: Bob Nystrom Date: Thu, 2 Mar 2017 07:17:03 -0800 Subject: [PATCH] Mention libm in docs. --- doc/site/embedding/index.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/site/embedding/index.markdown b/doc/site/embedding/index.markdown index c0d04278..0207c004 100644 --- a/doc/site/embedding/index.markdown +++ b/doc/site/embedding/index.markdown @@ -84,6 +84,13 @@ can find the [public header for Wren][wren.h]: :::c #include "wren.h" +Wren depends only on the C standard library, so you don't usually need to link +to anything else. On some platforms (at least BSD and Linux) some of the math +functions in `math.h` are implemented in a separate library, [libm][], that you +have to explicitly link to. + +[libm]: https://en.wikipedia.org/wiki/C_mathematical_functions#libm + If your program is in C++ but you are linking to the Wren library compiled as C, then you'll need to handle the calling convention differences like so: