-
Notifications
You must be signed in to change notification settings - Fork 780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compiling ruby script to C #1798
Comments
|
@take-cheeze can you point me towards a working example of code being compiled from a ruby script to c using mruby? This is my first time dealing with C directly and I am having issue getting this to work |
Replace
with
|
@Sjeanpierre I've actually thought about putting something simple together as an example so I did that real quick. Here is the repo with instructions https://github.com/carsonmcdonald/mruby-c-example |
@matz @carsonmcdonald you guys are awesome, thanks for helping out! |
I'm trying to follow this blog post from 2012 on compiling to C but ran into some issues.
http://blog.mruby.sh/201207020720.html
are there any current instructions on compiling a ruby script to C using mruby?
first I am running
mruby/bin/mrbc -Btest_symbol test_program.rb
When I run gcc -Imruby/src -Imruby/include -c test_program.c -o test_program.o i get the following error
test_program.c: In function ‘main’:
test_program.c:24: warning: implicit declaration of function ‘mrb_read_irep’
test_program.c:25: error: ‘mrb_state’ has no member named ‘irep’
here is the content of my test_program.c
The text was updated successfully, but these errors were encountered: