IoLanguage / io

Io programming language. Inspired by Self, Smalltalk and LISP.
http://iolanguage.org
Other
2.67k stars 299 forks source link

Embedding Io #447

Closed nikneym closed 3 years ago

nikneym commented 3 years ago

Hi, I want to embed Io inside to my project but I've got some linker errors. am I missing a flag there?

gcc main.c -lbasekit -liovmall

I ran this code to check if it works

#include <stdio.h>
#include "io/IoState.h"

int main(int argc, const char *argv[]) {
    IoState *self = IoState_new();
    IoState_init(self);
    IoState_doCString_(self, "writeln(\"hello world!\"");
    IoState_free(self);
    return 0;
}

the errors I got image

I got the shared library installed at usr/local/lib

image

and header files at usr/local/include

image

ales-tsurko commented 3 years ago

gcc main.c -lbasekit -liovmall -lm?

nikneym commented 3 years ago

Ah, thank you. Works like a charm!