Mac - Compile program with dune

I got this program :

open Base;;
open Batteries;;
let st = String.slice ~first:(1) ~last:(3) "ABCD";;
print_string st;;

My file dune :
 (name prog) 
(libraries /Users/xt/.opam/system/lib/Base /Users/xt/.opam/system/lib/Batteries) )

When I try: "dune build prog.exe" 
returns "Error: Library ... not found."

How to build the "dune" file to compile and create executable?


 (name prog) 
(libraries base batteries) )


I use mac osx. I change file dune.
When i try “dune build prog.exe”
Error: Don’t know how to build prog.exe

what about dune build ./prog.exe?

returns the same error

See , it has a simple example of using dune. You can do something similar.

the “.exe” extension is only for windows i think

Nope, Dune uses it on all platforms.

File was in another directory. It is already running, thx.