-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
15 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$ gcc -fPIC -Wall -I`ocamlc -where` -L`ocamlc -where` -ltermcap -lm -ldl \ | ||
-o finalbc.native main.c embed_out.o -lcamlrun | ||
$ ./finalbc.native | ||
Before calling OCaml | ||
hello embedded world 1 | ||
hello embedded world 2 | ||
After calling OCaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
$ ocamlopt -output-obj -o embed_native.o embed_me1.ml embed_me2.ml | ||
$ gcc -Wall -I `ocamlc -where` -o final.native embed_native.o main.c \ | ||
-L `ocamlc -where` -lasmrun -ltermcap -lm -ldl | ||
$ ./final.native | ||
Before calling OCaml | ||
hello embedded world 1 | ||
hello embedded world 2 | ||
After calling OCaml |
File renamed without changes.
File renamed without changes.