J'ai un programme OCaml que j'aimerais appeler de Vim.Appeler OCaml de Vim: impossible de charger la bibliothèque partagée dllbin_prot_stubs
Dans mon .vimrc
, j'ai défini une commande qui doit exécuter le bytecode OCaml:
command! MyCommand call FunctionCallingOCaml()
function! FunctionCallingOCaml()
let scriptPath = $HOME . "/path/to/myOCamlProgram.byte"
let ocamlCmd = "ocamlrun " . scriptPath
execute "!" . ocamlCmd
endfunction
Malheureusement, cela ne fonctionne pas; Je reçois un message d'erreur:
Fatal error: cannot load shared library dllbin_prot_stubs Reason: dllbin_prot_stubs.so: cannot open shared object file: No such file or directory
Je peux exécuter myOCamlProgram.byte
sans accroc d'un autre terminal bash en cours d'exécution.
En outre, je peux appeler des built-ins shell comme ls
et des programmes comme grep
de Vim sans problème en utilisant execute
.
Mon système:
uname -a
:
Linux marathon 4.12.10-1-ARCH #1 SMP PREEMPT Wed Aug 30 12:18:42 CEST 2017 x86_64 GNU/Linux
opam --version
: 1.2.2
VIM - Vi Improved 8,0 (2016 12 sept compilé 19 septembre 2017 13h59: 47)