0

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".

Addem
  • 3,635
  • 3
  • 35
  • 58
  • I really want to help you, but I'm not using Ocaide and probably nobody except you is using it. I believe that this plugin is outdated and is probably no longer supported. If it is supported, then probably it is better to ask the authors. Consider using IDE which are supported, namely Visual Studio Code, Emacs, Vim, Sublime, Atom. Also choosing and configuring your IDE is off-topic for SO, therefore consider using OCaml Discuss or Discord for such questions, we will happily assist you in setting up your environment. If you need pointers, please ask. – ivg Jun 25 '19 at 16:40
  • @ivg No worries, I'm starting to realize the same. I'm not using it by choice, so I will start making more and more emphatic arguments that I should not be working in this IDE. However, I would strike Atom from the list, as I've tried to request help for that here and on the GitHub page for the project. No luck there. Anyway, were it up to me I'd just use some simple editor and the terminal, and I'll try to move to that if I can. – Addem Jun 25 '19 at 16:42

0 Answers0