We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents b1c6646 + bdff466 commit 11bdea2Copy full SHA for 11bdea2
1 file changed
docs/articles/executing-ruby-code-with-mruby.md
@@ -196,11 +196,13 @@ test_symbol[] = {
196
};
197
~~~
198
199
-To execute this bytecode the following boilerplate has to be written:
+To execute this bytecode the following boilerplate has to be written (name this
200
+file `test_stub.c`):
201
202
~~~c
203
#include "mruby.h"
204
#include "mruby/irep.h"
205
+#include "test_program.c"
206
207
int
208
main(void)
@@ -217,8 +219,7 @@ This will read the bytecode from the array and executes it immediately:
217
219
To compile and link:
218
220
221
-$ gcc -std=c99 -Imruby/include test_program.c -o test_program
-test_program.o mruby/build/host/lib/libmruby.a
222
+$ gcc -std=c99 -Imruby/include test_stub.c -o test_program mruby/build/host/lib/libmruby.a
223
224
225
To execute:
0 commit comments