OCaml: When I add packages to the command line, Ocaide no longer executes the new bytecode

128 Views Asked by At

I'm using Ocaide on a Linux Mint and when I run a file with just print_string "TEST";; it prints as expected. Now I want to write some code and use OUnit, so I put open OUnit2;; at the top. It gives an error that the module is unbound, fine, I right-click the file and open Properties, under OCaml Module in the field for adding command line flags, I put package -oUnit -linkpkg -g and the error goes away. However, I change the print line to print_string "Other test" and now it continues to print the original message "TEST".

It seems that, with the command line flags, the byte-code is no longer updating. Before adding the flags, it would correctly update the byte-code whenever the file was saved.

I've tried adding the flags not to the module but to the package. I've also tried having the flags in both. None has worked.

When I open the run configurations, the fields containing the project name, executable file, and command line arguments all seem to be correct.

When I open a terminal and navigate to the project in the Eclipse workspace and run the executable there, it still prints the old message, "TEST".

It shows no compilation or other errors.

At the command line I can execute ocamlfind ocamlc -o test -package oUnit -linkpkg -g test.ml and this successfully creates a file, test, which when I run it has the updated message "Other test".

0

There are 0 best solutions below