--- a/meson.build
+++ b/meson.build
@@ -192,10 +192,11 @@
 else
   extra_cflags = []
 endif
-janet_mainclient = executable('janet', janetc, mainclient_src,
+janet_mainclient = executable('janet', mainclient_src,
   include_directories : incdir,
   dependencies : janet_dependencies,
   c_args : extra_cflags,
+  link_with : [libjanet],
   install : true)
 
 if meson.is_cross_build()
