Closed fudanchii closed 10 years ago
If you run make
, it will build mruby and put it there. The readme says this. go build
by itself won't work until you setup libmruby.a
I've setup libmruby.a, from within go-mruby folder, with make
, but the readme doesn't indicate anything about how I can integrate go-mruby with any existing project.
I think the readme could be more verbose about this,
in my case, if I don't want to manually copy the *.a files, I should call make -f ~/go/src/github.com/mitchellh/go-mruby/Makefile
from within my project folder instead, before proceed to the usual go build
.
Is go-mruby source file is intended to be embedded in another project source folder? the readme doesn't say anything about this, but the make
command indicates so.
Thanks
Yes it is, you just need to put libmruby.a
in the source folder, then go get
works.
my os is mac os , put libmruby.a
which folder ?
Both in go-mruby source folder and in your project's source folder if you're planning to link go-mruby in your project.
On Fri, Apr 11, 2014 at 6:25 PM, lidashuang notifications@github.comwrote:
my os is mac os , put libmruby.a which folder ?
Reply to this email directly or view it on GitHubhttps://github.com/mitchellh/go-mruby/issues/2#issuecomment-40193842 .
regards,
@fudanchii It works! thanks
Yep, the best place is your own projects folder because then you can customize the gems and such.
Is it possible to have fixed location for external static linked file? I tried to integrate go-mruby within my irc bot framework here https://github.com/fudanchii/sifr/compare/mruby-support?expand=1
but when I run
go build
it looks like Go looking for the .a files at my project's root directory instead of go-mruby'sIt works okay after I copied both libcrypto.a and libmruby.a manually. (using iij/mruby here since it's already embedded with some useful gems by default). But it will surely cumbersome to always manually copy both of the files in case I work with multiple projects
Maybe we can set a fixed path somewhere and let Go tools or
Make
copy those files there?