Re: [O] ob-C doesn't support load libraries

2016-06-12 Thread numbch...@gmail.com
Thanks. [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Sat, Jun 11, 2016 at 12:44 AM, Thierry Banel

Re: [O] ob-C doesn't support load libraries

2016-06-10 Thread Thierry Banel
Change the first line to   #+BEGIN_SRC C :libs -lm This instructs the C++ compiler to link with the "m" library (mathematical functions). You need a pretty new version of ob-C.el, as the :libs parameter was introduced recently.

[O] ob-C doesn't support load libraries

2016-06-10 Thread numbch...@gmail.com
I have a code example like this: #+BEGIN_SRC C #include #include /* define complex struct */ struct complex_struct { double x, y; }; /* some helper functions on complex struct */ double real_part(struct complex_struct z) { return z.x; } double img_part(struct complex_struct z) { return