[CM] s7, undefined reference errors

Kjetil Matheussen k.s.matheussen at gmail.com
Mon Sep 19 11:11:13 PDT 2016


On Mon, Sep 19, 2016 at 7:57 PM, James Hearon <j_hearon at hotmail.com> wrote:

> Hi,
>
> I was trying to get back to looking at s7 as interpreter but I'm failing
> to compile for some reason.
>
>
> I have s7.o, s7.h, and snd is working ok.  But I'm getting undefined ref
> errors trying to compile below and a little stumped what might be going
> wrong?  Seems like it's not finding something it needs.
>
>
> //gcc -o repel_test repel_test.c s7.o  -Wl,-export-dynamic -lm -I. -ldl
> #include "/opt/snd-16/s7.h"
> int main (int argc, char **argv)
> {
>     s7_scheme *sc;
>     sc = s7_init();
>     s7_load(sc, "/opt/snd-16/repl.scm");
>     s7_eval_c_string(sc, "((*repl* 'run))");
>     return(0);
> }
>
> -----------------
>
> /opt/snd-16/s7.o: In function `sweep':
> s7.c:(.text+0x1b40): undefined reference to `__gmpz_clear'
>

Hi,

It seems like you compile s7 with "WITH_GMP" defined somehow.
Perhaps you have a mus-config.h file where WITH_GMP is defined?

I guess it compiles if you remove WITH_GMP from mus-config.h,
 or link in libgmp: -lgmp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/mailman/private/cmdist/attachments/20160919/a939d58e/attachment.html>


More information about the Cmdist mailing list