Closed ghost closed 9 years ago
You somehow founded an outdated README, look at that one that is on github page.
What concerning the error, just to explain its meaning:
File "mycode.ml", line 6, characters 10-34:
Error: Unbound value Project.register_plugin'
Command exited with code 2.
This was an error. It says, that symbol Project.register_plugin'
is unknown. This is because at later versions of bap, it was renamed to Project.register_pass'
.
Everything else in the error message is a hint from a build system, that doesn't correspond to the error.
when I tried to run the example code in README with "bapbuild mycode.plugin", it reports:
ocamlfind ocamlc -c -g -annot -bin-annot -short-paths -thread -syntax camlp4o -package re.posix -package fileutils -package cmdliner -package ezjsonm -package ocamlgraph -package variantslib.syntax -package fieldslib.syntax -package comparelib.syntax -package sexplib.syntax -package core_kernel -package bap.plugins -package bap -o mycode.cmo mycode.ml File "mycode.ml", line 6, characters 10-34: Error: Unbound value Project.register_plugin' Command exited with code 2. Hint: Recursive traversal of subdirectories was not enabled for this build, as the working directory does not look like an ocamlbuild project (no '_tags' or 'myocamlbuild.ml' file). If you have modules in subdirectories, you should add the option "-r" or create an empty '_tags' file.
To enable recursive traversal for some subdirectories only, you can use the following '_tags' file:
It seems that it needs module Project in subdirectories of my working directory, I tried "open Project" and to use "-r" in the command, but still failed, what is the problem? Add the module Project in the subdirectory?